X-Git-Url: https://git.netwichtig.de/gitweb/?a=blobdiff_plain;f=src%2Fmodules%2Fm_hideoper.cpp;h=fbab9685f6c65b9909f997abf3f4829806a488aa;hb=9cdf47629faeec64edc77ff0729dc55946ed753c;hp=998a57bb3c59b4d8a5b818a867ad71d15c6f5089;hpb=2ab2de1dda8f2043898b9df8004ba5b6c4df7349;p=user%2Fhenk%2Fcode%2Finspircd.git diff --git a/src/modules/m_hideoper.cpp b/src/modules/m_hideoper.cpp index 998a57bb3..fbab9685f 100644 --- a/src/modules/m_hideoper.cpp +++ b/src/modules/m_hideoper.cpp @@ -41,10 +41,13 @@ class ModuleHideOper : public Module ModuleHideOper() : hm(this) { - if (!ServerInstance->Modes->AddMode(&hm)) - throw ModuleException("Could not add new modes!"); + } + + void init() + { + ServerInstance->Modules->AddService(hm); Implementation eventlist[] = { I_OnWhoisLine, I_OnSendWhoLine }; - ServerInstance->Modules->Attach(eventlist, this, 2); + ServerInstance->Modules->Attach(eventlist, this, sizeof(eventlist)/sizeof(Implementation)); }