summaryrefslogtreecommitdiff
path: root/modules/extra/cs_set_misc.cpp
diff options
context:
space:
mode:
authorAdam <Adam@anope.org>2011-04-22 03:16:11 -0400
committerAdam <Adam@anope.org>2011-05-16 04:06:17 -0400
commitc8c23158a4ff74822d6c7d201dc53d879e3d91e8 (patch)
tree4bc9ae029691d5e7c03ebc1481683a010b733844 /modules/extra/cs_set_misc.cpp
parent1782ce260c5bc214ec0b2e39257ab1371b68ae9c (diff)
Moved the core pseudo clients out into their own modules
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;