X-Git-Url: https://git.netwichtig.de/gitweb/?a=blobdiff_plain;f=src%2Fmodules%2Fm_chanfilter.cpp;h=651e659b59d437bfd468573ffc1a676a0d03c7f5;hb=a5d110282a864fd2e91b51ce360a977cd0643657;hp=3bc1082a643214099f79a4cce0a41c462aaced7d;hpb=81d7a5b538737cd568c30e158b408721ef1824c2;p=user%2Fhenk%2Fcode%2Finspircd.git diff --git a/src/modules/m_chanfilter.cpp b/src/modules/m_chanfilter.cpp index 3bc1082a6..651e659b5 100644 --- a/src/modules/m_chanfilter.cpp +++ b/src/modules/m_chanfilter.cpp @@ -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); }