]> git.netwichtig.de Git - user/henk/code/inspircd.git/blobdiff - src/modules/m_hidechans.cpp
Merge pull request #1162 from SaberUK/insp20+fix-deinstall
[user/henk/code/inspircd.git] / src / modules / m_hidechans.cpp
index bb67c05a6a006848a3fc17d3da73cab39c5a23ed..008c622086efc8caf14147480de27d4ef194b5df 100644 (file)
@@ -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);
        }