public:
ModulePrivacyMode() : pm(this)
{
- if (!ServerInstance->Modes->AddMode(&pm))
- throw ModuleException("Could not add new modes!");
- Implementation eventlist[] = { I_OnUserPreMessage, I_OnUserPreNotice };
- ServerInstance->Modules->Attach(eventlist, this, 2);
}
+ void init()
+ {
+ ServerInstance->Modules->AddService(pm);
+ Implementation eventlist[] = { I_OnUserPreMessage, I_OnUserPreNotice };
+ ServerInstance->Modules->Attach(eventlist, this, sizeof(eventlist)/sizeof(Implementation));
+ }
virtual ~ModulePrivacyMode()
{