]> 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 b2497cbe0a195269cb4e6aaafbbbe88f0b1c571f..008c622086efc8caf14147480de27d4ef194b5df 100644 (file)
@@ -41,8 +41,7 @@ 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, sizeof(eventlist)/sizeof(Implementation));
                OnRehash(NULL);