X-Git-Url: https://git.netwichtig.de/gitweb/?a=blobdiff_plain;f=src%2Fmodules%2Fm_hideoper.cpp;h=fbab9685f6c65b9909f997abf3f4829806a488aa;hb=b55c842c9d8730e50865fb7dd98bce4aa85af0d7;hp=998a57bb3c59b4d8a5b818a867ad71d15c6f5089;hpb=74ee9af96639323d852a8b15be72ee9974e0a826;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)); }