]> git.netwichtig.de Git - user/henk/code/inspircd.git/blobdiff - src/modules/m_chanfilter.cpp
Update wiki links to use HTTPS and point to the correct pages.
[user/henk/code/inspircd.git] / src / modules / m_chanfilter.cpp
index 3bc1082a643214099f79a4cce0a41c462aaced7d..651e659b59d437bfd468573ffc1a676a0d03c7f5 100644 (file)
@@ -76,12 +76,15 @@ class ModuleChanFilter : public Module
        ModuleChanFilter()
                : cf(this)
        {
-               if (!ServerInstance->Modes->AddMode(&cf))
-                       throw ModuleException("Could not add new modes!");
+       }
+
+       void init()
+       {
+               ServerInstance->Modules->AddService(cf);
 
                cf.DoImplements(this);
                Implementation eventlist[] = { I_OnRehash, I_OnUserPreMessage, I_OnUserPreNotice, I_OnSyncChannel };
-               ServerInstance->Modules->Attach(eventlist, this, 4);
+               ServerInstance->Modules->Attach(eventlist, this, sizeof(eventlist)/sizeof(Implementation));
 
                OnRehash(NULL);
        }