diff options
Diffstat (limited to 'modules/core/os_restart.cpp')
-rw-r--r-- | modules/core/os_restart.cpp | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/modules/core/os_restart.cpp b/modules/core/os_restart.cpp index 02663e862..73c36d21e 100644 --- a/modules/core/os_restart.cpp +++ b/modules/core/os_restart.cpp @@ -12,6 +12,7 @@ /*************************************************************************/ #include "module.h" +#include "operserv.h" class CommandOSRestart : public Command { @@ -25,9 +26,6 @@ class CommandOSRestart : public Command { User *u = source.u; quitmsg = "RESTART command received from " + u->nick; - - if (Config->GlobalOnCycle) - oper_global("", "%s", Config->GlobalOnCycleMessage.c_str()); do_restart_services(); return MOD_CONT; } @@ -52,7 +50,10 @@ class OSRestart : public Module this->SetAuthor("Anope"); this->SetType(CORE); - this->AddCommand(OperServ, &commandosrestart); + if (!operserv) + throw ModuleException("OperServ is not loaded!"); + + this->AddCommand(operserv->Bot(), &commandosrestart); } }; |