summaryrefslogtreecommitdiff
path: root/modules/core/os_modreload.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'modules/core/os_modreload.cpp')
-rw-r--r--modules/core/os_modreload.cpp8
1 files changed, 6 insertions, 2 deletions
diff --git a/modules/core/os_modreload.cpp b/modules/core/os_modreload.cpp
index 43625d980..e721f76a9 100644
--- a/modules/core/os_modreload.cpp
+++ b/modules/core/os_modreload.cpp
@@ -12,6 +12,7 @@
/*************************************************************************/
#include "module.h"
+#include "operserv.h"
class CommandOSModReLoad : public Command
{
@@ -58,7 +59,7 @@ class CommandOSModReLoad : public Command
status = ModuleManager::LoadModule(mname, u);
if (status == MOD_ERR_OK)
{
- ircdproto->SendGlobops(OperServ, "%s reloaded module %s", u->nick.c_str(), mname.c_str());
+ ircdproto->SendGlobops(operserv->Bot(), "%s reloaded module %s", u->nick.c_str(), mname.c_str());
source.Reply(_("Module \002%s\002 reloaded"), mname.c_str());
/* If a user is loading this module, then the core databases have already been loaded
@@ -104,7 +105,10 @@ class OSModReLoad : public Module
this->SetType(CORE);
this->SetPermanent(true);
- this->AddCommand(OperServ, &commandosmodreload);
+ if (!operserv)
+ throw ModuleException("OperServ is not loaded!");
+
+ this->AddCommand(operserv->Bot(), &commandosmodreload);
}
};