diff options
author | Adam <Adam@anope.org> | 2013-09-20 21:07:50 -0400 |
---|---|---|
committer | Adam <Adam@anope.org> | 2013-09-20 21:09:35 -0400 |
commit | e5ece18ee7804ed81f1b0f80af30a9aea8320522 (patch) | |
tree | 11ef551790936e22fb54122441fd152566ed0c17 /modules/commands/hs_request.cpp | |
parent | 8641b995c43593289dc4e66cbf980069b80d6d6b (diff) |
Readonlyize many commands
Diffstat (limited to 'modules/commands/hs_request.cpp')
-rw-r--r-- | modules/commands/hs_request.cpp | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/modules/commands/hs_request.cpp b/modules/commands/hs_request.cpp index e7d39f589..9f6f6d3e0 100644 --- a/modules/commands/hs_request.cpp +++ b/modules/commands/hs_request.cpp @@ -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] : ""; |