X-Git-Url: https://git.netwichtig.de/gitweb/?a=blobdiff_plain;f=src%2Fmodules%2Fm_hidechans.cpp;h=008c622086efc8caf14147480de27d4ef194b5df;hb=64faca29b377185c4615c8f2e4eecedc7ad045d1;hp=023189748b3d181b43c38a15fa3849ce354c9209;hpb=a4db7bf9af00b32d4f5c1922997d02b0b8be59e5;p=user%2Fhenk%2Fcode%2Finspircd.git diff --git a/src/modules/m_hidechans.cpp b/src/modules/m_hidechans.cpp index 023189748..008c62208 100644 --- a/src/modules/m_hidechans.cpp +++ b/src/modules/m_hidechans.cpp @@ -37,10 +37,13 @@ class ModuleHideChans : public Module public: ModuleHideChans() : 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_OnRehash }; - ServerInstance->Modules->Attach(eventlist, this, 2); + ServerInstance->Modules->Attach(eventlist, this, sizeof(eventlist)/sizeof(Implementation)); OnRehash(NULL); }