void init()
{
- if (!ServerInstance->Modes->AddMode(&nk))
- throw ModuleException("Could not add new modes!");
+ ServerInstance->Modules->AddService(nk);
Implementation eventlist[] = { I_OnUserPreKick, I_On005Numeric };
- ServerInstance->Modules->Attach(eventlist, this, 2);
+ ServerInstance->Modules->Attach(eventlist, this, sizeof(eventlist)/sizeof(Implementation));
}
void On005Numeric(std::string &output)