summaryrefslogtreecommitdiff
path: root/modules/extra/cs_set_misc.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'modules/extra/cs_set_misc.cpp')
-rw-r--r--modules/extra/cs_set_misc.cpp16
1 files changed, 10 insertions, 6 deletions
diff --git a/modules/extra/cs_set_misc.cpp b/modules/extra/cs_set_misc.cpp
index cb654a9a1..4bd7a772a 100644
--- a/modules/extra/cs_set_misc.cpp
+++ b/modules/extra/cs_set_misc.cpp
@@ -11,6 +11,7 @@
/*************************************************************************/
#include "module.h"
+#include "chanserv.h"
class CommandCSSetMisc : public Command
{
@@ -77,8 +78,8 @@ class CSSetMisc : public Module
if (Commands.empty())
return;
- Command *set = FindCommand(ChanServ, "SET");
- Command *saset = FindCommand(ChanServ, "SASET");
+ Command *set = FindCommand(chanserv->Bot(), "SET");
+ Command *saset = FindCommand(chanserv->Bot(), "SASET");
if (!set && !saset)
return;
@@ -114,10 +115,13 @@ class CSSetMisc : public Module
this->SetAuthor("Anope");
this->SetType(CORE);
+ if (!chanserv)
+ throw ModuleException("ChanServ is not loaded!");
+
Implementation i[] = { I_OnReload, I_OnChanInfo, I_OnDatabaseWriteMetadata, I_OnDatabaseReadMetadata };
ModuleManager::Attach(i, this, 4);
- OnReload(true);
+ OnReload();
}
~CSSetMisc()
@@ -125,12 +129,12 @@ class CSSetMisc : public Module
RemoveAll();
}
- void OnReload(bool)
+ void OnReload()
{
RemoveAll();
- Command *set = FindCommand(ChanServ, "SET");
- Command *saset = FindCommand(ChanServ, "SASET");
+ Command *set = FindCommand(chanserv->Bot(), "SET");
+ Command *saset = FindCommand(chanserv->Bot(), "SASET");
if (!set && !saset)
return;