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/ms_send.cpp | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'modules/commands/ms_send.cpp') diff --git a/modules/commands/ms_send.cpp b/modules/commands/ms_send.cpp index 87603025a..7791ba32d 100644 --- a/modules/commands/ms_send.cpp +++ b/modules/commands/ms_send.cpp @@ -33,6 +33,12 @@ class CommandMSSend : public Command const Anope::string &nick = params[0]; const Anope::string &text = params[1]; + if (Anope::ReadOnly && !source.IsOper()) + { + source.Reply(MEMO_SEND_DISABLED); + return; + } + MemoServService::MemoResult result = memoserv->Send(source.GetNick(), nick, text); if (result == MemoServService::MEMO_SUCCESS) source.Reply(_("Memo sent to \002%s\002."), nick.c_str()); -- cgit