X-Git-Url: https://git.netwichtig.de/gitweb/?a=blobdiff_plain;f=src%2Fmodules%2Fm_hideoper.cpp;h=58887ba96e023f0ef41c345c8350c602e8a4922d;hb=e9e75e50bc25e67af22dd88b39b12217a553d5cb;hp=998a57bb3c59b4d8a5b818a867ad71d15c6f5089;hpb=0fa8cdd7b87779e3517e296689703f1d7a7c86df;p=user%2Fhenk%2Fcode%2Finspircd.git diff --git a/src/modules/m_hideoper.cpp b/src/modules/m_hideoper.cpp index 998a57bb3..58887ba96 100644 --- a/src/modules/m_hideoper.cpp +++ b/src/modules/m_hideoper.cpp @@ -41,15 +41,13 @@ class ModuleHideOper : public Module ModuleHideOper() : hm(this) { - if (!ServerInstance->Modes->AddMode(&hm)) - throw ModuleException("Could not add new modes!"); - Implementation eventlist[] = { I_OnWhoisLine, I_OnSendWhoLine }; - ServerInstance->Modules->Attach(eventlist, this, 2); } - - virtual ~ModuleHideOper() + void init() { + ServerInstance->Modules->AddService(hm); + Implementation eventlist[] = { I_OnWhoisLine, I_OnSendWhoLine }; + ServerInstance->Modules->Attach(eventlist, this, sizeof(eventlist)/sizeof(Implementation)); } virtual Version GetVersion() @@ -89,5 +87,4 @@ class ModuleHideOper : public Module } }; - MODULE_INIT(ModuleHideOper)