summaryrefslogtreecommitdiff
path: root/modules/commands/cs_mode.cpp
diff options
context:
space:
mode:
authorAdam <Adam@anope.org>2013-09-20 21:07:50 -0400
committerAdam <Adam@anope.org>2013-09-20 21:09:35 -0400
commite5ece18ee7804ed81f1b0f80af30a9aea8320522 (patch)
tree11ef551790936e22fb54122441fd152566ed0c17 /modules/commands/cs_mode.cpp
parent8641b995c43593289dc4e66cbf980069b80d6d6b (diff)
Readonlyize many commands
Diffstat (limited to 'modules/commands/cs_mode.cpp')
-rw-r--r--modules/commands/cs_mode.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/modules/commands/cs_mode.cpp b/modules/commands/cs_mode.cpp
index 856b43870..f7233eb27 100644
--- a/modules/commands/cs_mode.cpp
+++ b/modules/commands/cs_mode.cpp
@@ -268,6 +268,12 @@ class CommandCSMode : public Command
bool override = !source.AccessFor(ci).HasPriv("MODE");
ModeLocks *modelocks = ci->Require<ModeLocks>("modelocks");
+ if (Anope::ReadOnly && !subcommand.equals_ci("LIST"))
+ {
+ source.Reply(READ_ONLY_MODE);
+ return;
+ }
+
if ((subcommand.equals_ci("ADD") || subcommand.equals_ci("SET")) && !param.empty())
{
/* If setting, remove the existing locks */