diff options
Diffstat (limited to 'modules/commands/cs_mode.cpp')
-rw-r--r-- | modules/commands/cs_mode.cpp | 6 |
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 */ |