public:
ModuleHideChans() : hm(this)
{
- if (!ServerInstance->Modes->AddMode(&hm))
- throw ModuleException("Could not add new modes!");
- Implementation eventlist[] = { I_OnWhoisLine, I_OnRehash };
- ServerInstance->Modules->Attach(eventlist, this, 2);
- OnRehash(NULL);
}
- virtual ~ModuleHideChans()
+ void init()
{
+ ServerInstance->Modules->AddService(hm);
+ Implementation eventlist[] = { I_OnWhoisLine, I_OnRehash };
+ ServerInstance->Modules->Attach(eventlist, this, sizeof(eventlist)/sizeof(Implementation));
+ OnRehash(NULL);
}
virtual Version GetVersion()
}
};
-
MODULE_INIT(ModuleHideChans)