diff options
author | DukePyrolator <DukePyrolator@anope.org> | 2014-09-14 11:11:22 +0200 |
---|---|---|
committer | DukePyrolator <DukePyrolator@anope.org> | 2014-09-14 11:11:22 +0200 |
commit | 8e7b742ec73a0a0c5a9ae1dc4ce246ebbe37c737 (patch) | |
tree | e5a87948b0f480f9d9889751c53b9d56f344531f /modules/commands/os_defcon.cpp | |
parent | 19b47c7bae10c4a93588556b94ea9f173d9d9c81 (diff) |
added missing support for operonly and silentoperonly in os_defcon
Diffstat (limited to 'modules/commands/os_defcon.cpp')
-rw-r--r-- | modules/commands/os_defcon.cpp | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/modules/commands/os_defcon.cpp b/modules/commands/os_defcon.cpp index c5074fd44..a618693d6 100644 --- a/modules/commands/os_defcon.cpp +++ b/modules/commands/os_defcon.cpp @@ -439,7 +439,16 @@ class OSDefcon : public Module EventReturn OnPreCommand(CommandSource &source, Command *command, std::vector<Anope::string> ¶ms) anope_override { - if (command->name == "nickserv/register" || command->name == "nickserv/group") + if (Config.Check(DEFCON_OPER_ONLY) && !source.IsOper()) + { + source.Reply(_("Services are in DefCon mode, please try again later.")); + return EVENT_STOP; + } + else if (DConfig.Check(DEFCON_SILENT_OPER_ONLY) && !source.IsOper()) + { + return EVENT_STOP; + } + else if (command->name == "nickserv/register" || command->name == "nickserv/group") { if (DConfig.Check(DEFCON_NO_NEW_NICKS)) { |