summaryrefslogtreecommitdiff
path: root/src/modules/m_chanprotect.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/modules/m_chanprotect.cpp')
-rw-r--r--src/modules/m_chanprotect.cpp10
1 files changed, 6 insertions, 4 deletions
diff --git a/src/modules/m_chanprotect.cpp b/src/modules/m_chanprotect.cpp
index 61ffa3ad2..62e41416b 100644
--- a/src/modules/m_chanprotect.cpp
+++ b/src/modules/m_chanprotect.cpp
@@ -231,14 +231,16 @@ class ModuleChanProtect : public Module
public:
ModuleChanProtect() : cp(this), cf(this)
{
+ }
+
+ void init()
+ {
/* Load config stuff */
LoadSettings();
settings.booting = false;
- if (!ServerInstance->Modes->AddMode(&cp) || !ServerInstance->Modes->AddMode(&cf))
- {
- throw ModuleException("Could not add new modes!");
- }
+ ServerInstance->Modules->AddService(cf);
+ ServerInstance->Modules->AddService(cp);
Implementation eventlist[] = { I_OnUserPreJoin };
ServerInstance->Modules->Attach(eventlist, this, 1);