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);
}