void init()
{
- if (!ServerInstance->Modes->AddMode(&pm))
- throw ModuleException("Could not add new modes!");
+ ServerInstance->Modules->AddService(pm);
Implementation eventlist[] = { I_OnUserPreMessage, I_OnUserPreNotice };
- ServerInstance->Modules->Attach(eventlist, this, 2);
+ ServerInstance->Modules->Attach(eventlist, this, sizeof(eventlist)/sizeof(Implementation));
}
virtual ~ModulePrivacyMode()