mirror of
https://github.com/anope/anope.git
synced 2026-07-09 14:23:13 +02:00
Readonlyize many commands
This commit is contained in:
@@ -82,6 +82,12 @@ class CommandHSRequest : public Command
|
||||
|
||||
void Execute(CommandSource &source, const std::vector<Anope::string> ¶ms) anope_override
|
||||
{
|
||||
if (Anope::ReadOnly)
|
||||
{
|
||||
source.Reply(READ_ONLY_MODE);
|
||||
return;
|
||||
}
|
||||
|
||||
User *u = source.GetUser();
|
||||
NickAlias *na = NickAlias::Find(source.GetNick());
|
||||
if (!na || na->nc != source.GetAccount())
|
||||
@@ -183,6 +189,11 @@ class CommandHSActivate : public Command
|
||||
|
||||
void Execute(CommandSource &source, const std::vector<Anope::string> ¶ms) anope_override
|
||||
{
|
||||
if (Anope::ReadOnly)
|
||||
{
|
||||
source.Reply(READ_ONLY_MODE);
|
||||
return;
|
||||
}
|
||||
|
||||
const Anope::string &nick = params[0];
|
||||
|
||||
@@ -227,6 +238,11 @@ class CommandHSReject : public Command
|
||||
|
||||
void Execute(CommandSource &source, const std::vector<Anope::string> ¶ms) anope_override
|
||||
{
|
||||
if (Anope::ReadOnly)
|
||||
{
|
||||
source.Reply(READ_ONLY_MODE);
|
||||
return;
|
||||
}
|
||||
|
||||
const Anope::string &nick = params[0];
|
||||
const Anope::string &reason = params.size() > 1 ? params[1] : "";
|
||||
|
||||
Reference in New Issue
Block a user