- ho = new Helpop(ServerInstance);
- ServerInstance->AddMode(ho, 'h');
- mycommand = new cmd_helpop(ServerInstance);
- ServerInstance->AddCommand(mycommand);
+ if (!ServerInstance->Modes->AddMode(&ho))
+ throw ModuleException("Could not add new modes!");
+ ServerInstance->AddCommand(&cmd);
+ Implementation eventlist[] = { I_OnRehash, I_OnWhois };
+ ServerInstance->Modules->Attach(eventlist, this, 2);