void init()
{
- if (!ServerInstance->Modes->AddMode(&m1))
- throw ModuleException("Could not add new modes!");
+ ServerInstance->Modules->AddService(m1);
OnRehash(NULL);
Implementation eventlist[] = { I_OnUserPreMessage, I_OnUserPreNotice, I_OnRehash };
- ServerInstance->Modules->Attach(eventlist, this, 3);
+ ServerInstance->Modules->Attach(eventlist, this, sizeof(eventlist)/sizeof(Implementation));
}
virtual void OnRehash(User* user)