X-Git-Url: https://git.netwichtig.de/gitweb/?a=blobdiff_plain;f=src%2Fmodules%2Fm_chanfilter.cpp;h=651e659b59d437bfd468573ffc1a676a0d03c7f5;hb=a5d110282a864fd2e91b51ce360a977cd0643657;hp=2c89950445a83bc5b5ace04611310d0ea2b816a8;hpb=ac7defcd3e52695dcf5e5150e9fe3e1624205e64;p=user%2Fhenk%2Fcode%2Finspircd.git diff --git a/src/modules/m_chanfilter.cpp b/src/modules/m_chanfilter.cpp index 2c8995044..651e659b5 100644 --- a/src/modules/m_chanfilter.cpp +++ b/src/modules/m_chanfilter.cpp @@ -80,12 +80,11 @@ class ModuleChanFilter : public Module void init() { - if (!ServerInstance->Modes->AddMode(&cf)) - throw ModuleException("Could not add new modes!"); + 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); }