X-Git-Url: https://git.netwichtig.de/gitweb/?a=blobdiff_plain;f=src%2Fmodules%2Fm_hidechans.cpp;h=008c622086efc8caf14147480de27d4ef194b5df;hb=a785f350fd584d87f3b84bbaff569ecb59c29f04;hp=bb67c05a6a006848a3fc17d3da73cab39c5a23ed;hpb=ac7defcd3e52695dcf5e5150e9fe3e1624205e64;p=user%2Fhenk%2Fcode%2Finspircd.git diff --git a/src/modules/m_hidechans.cpp b/src/modules/m_hidechans.cpp index bb67c05a6..008c62208 100644 --- a/src/modules/m_hidechans.cpp +++ b/src/modules/m_hidechans.cpp @@ -41,10 +41,9 @@ class ModuleHideChans : public Module void init() { - if (!ServerInstance->Modes->AddMode(&hm)) - throw ModuleException("Could not add new modes!"); + ServerInstance->Modules->AddService(hm); Implementation eventlist[] = { I_OnWhoisLine, I_OnRehash }; - ServerInstance->Modules->Attach(eventlist, this, 2); + ServerInstance->Modules->Attach(eventlist, this, sizeof(eventlist)/sizeof(Implementation)); OnRehash(NULL); }