diff options
Diffstat (limited to 'modules/core/os_quit.cpp')
-rw-r--r-- | modules/core/os_quit.cpp | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/modules/core/os_quit.cpp b/modules/core/os_quit.cpp index ed85467c4..d21ac78be 100644 --- a/modules/core/os_quit.cpp +++ b/modules/core/os_quit.cpp @@ -13,6 +13,7 @@ /*************************************************************************/ #include "module.h" +#include "operserv.h" class CommandOSQuit : public Command { @@ -26,9 +27,6 @@ class CommandOSQuit : public Command { User *u = source.u; quitmsg = "QUIT command received from " + u->nick; - - if (Config->GlobalOnCycle) - oper_global("", "%s", Config->GlobalOnCycleMessage.c_str()); quitting = true; return MOD_CONT; } @@ -56,7 +54,10 @@ class OSQuit : public Module this->SetAuthor("Anope"); this->SetType(CORE); - this->AddCommand(OperServ, &commandosquit); + if (!operserv) + throw ModuleException("OperServ is not loaded!"); + + this->AddCommand(operserv->Bot(), &commandosquit); } }; |