summaryrefslogtreecommitdiff
path: root/modules/core/cs_mode.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'modules/core/cs_mode.cpp')
-rw-r--r--modules/core/cs_mode.cpp6
1 files changed, 5 insertions, 1 deletions
diff --git a/modules/core/cs_mode.cpp b/modules/core/cs_mode.cpp
index 55da9762c..fc4538033 100644
--- a/modules/core/cs_mode.cpp
+++ b/modules/core/cs_mode.cpp
@@ -12,6 +12,7 @@
/*************************************************************************/
#include "module.h"
+#include "chanserv.h"
class CommandCSMode : public Command
{
@@ -366,7 +367,10 @@ class CSMode : public Module
this->SetAuthor("Anope");
this->SetType(CORE);
- this->AddCommand(ChanServ, &commandcsmode);
+ if (!chanserv)
+ throw ModuleException("ChanServ is not loaded!");
+
+ this->AddCommand(chanserv->Bot(), &commandcsmode);
}
};