- mycommand = new CommandWatch(ServerInstance, maxwatch);
- ServerInstance->AddCommand(mycommand);
- sw = new CommandSVSWatch(ServerInstance);
- ServerInstance->AddCommand(sw);
- Implementation eventlist[] = { I_OnRehash, I_OnGarbageCollect, I_OnCleanup, I_OnUserQuit, I_OnPostConnect, I_OnUserPostNick, I_On005Numeric, I_OnSetAway };
- ServerInstance->Modules->Attach(eventlist, this, 8);
+ }
+
+ void init()
+ {
+ OnRehash(NULL);
+ ServerInstance->Modules->AddService(cmdw);
+ ServerInstance->Modules->AddService(sw);
+ ServerInstance->Modules->AddService(cmdw.ext);
+ Implementation eventlist[] = { I_OnRehash, I_OnGarbageCollect, I_OnUserQuit, I_OnPostConnect, I_OnUserPostNick, I_On005Numeric, I_OnSetAway };
+ ServerInstance->Modules->Attach(eventlist, this, sizeof(eventlist)/sizeof(Implementation));