From e5ece18ee7804ed81f1b0f80af30a9aea8320522 Mon Sep 17 00:00:00 2001 From: Adam Date: Fri, 20 Sep 2013 21:07:50 -0400 Subject: Readonlyize many commands --- modules/commands/hs_request.cpp | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) (limited to 'modules/commands/hs_request.cpp') 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 ¶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 ¶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 ¶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] : ""; -- cgit