]> git.netwichtig.de Git - user/henk/code/inspircd.git/blobdiff - src/modules/m_hideoper.cpp
m_spanningtree Remove unneeded #includes
[user/henk/code/inspircd.git] / src / modules / m_hideoper.cpp
index 998a57bb3c59b4d8a5b818a867ad71d15c6f5089..58887ba96e023f0ef41c345c8350c602e8a4922d 100644 (file)
@@ -41,15 +41,13 @@ class ModuleHideOper : public Module
        ModuleHideOper()
                : hm(this)
        {
-               if (!ServerInstance->Modes->AddMode(&hm))
-                       throw ModuleException("Could not add new modes!");
-               Implementation eventlist[] = { I_OnWhoisLine, I_OnSendWhoLine };
-               ServerInstance->Modules->Attach(eventlist, this, 2);
        }
 
-
-       virtual ~ModuleHideOper()
+       void init()
        {
+               ServerInstance->Modules->AddService(hm);
+               Implementation eventlist[] = { I_OnWhoisLine, I_OnSendWhoLine };
+               ServerInstance->Modules->Attach(eventlist, this, sizeof(eventlist)/sizeof(Implementation));
        }
 
        virtual Version GetVersion()
@@ -89,5 +87,4 @@ class ModuleHideOper : public Module
        }
 };
 
-
 MODULE_INIT(ModuleHideOper)