]> git.netwichtig.de Git - user/henk/code/inspircd.git/blobdiff - src/modules/m_hidechans.cpp
m_spanningtree Remove unneeded #includes
[user/henk/code/inspircd.git] / src / modules / m_hidechans.cpp
index bb67c05a6a006848a3fc17d3da73cab39c5a23ed..1669fe2f20d8a699c750fc0250c92e680692a797 100644 (file)
@@ -41,17 +41,12 @@ 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);
        }
 
-       virtual ~ModuleHideChans()
-       {
-       }
-
        virtual Version GetVersion()
        {
                return Version("Provides support for hiding channels with user mode +I", VF_VENDOR);
@@ -89,5 +84,4 @@ class ModuleHideChans : public Module
        }
 };
 
-
 MODULE_INIT(ModuleHideChans)