]> git.netwichtig.de Git - user/henk/code/inspircd.git/blobdiff - src/modules/m_hideoper.cpp
Fix issue #657, fix sending FNAME with spaces
[user/henk/code/inspircd.git] / src / modules / m_hideoper.cpp
index 998a57bb3c59b4d8a5b818a867ad71d15c6f5089..fbab9685f6c65b9909f997abf3f4829806a488aa 100644 (file)
@@ -41,10 +41,13 @@ class ModuleHideOper : public Module
        ModuleHideOper()
                : 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_OnSendWhoLine };
-               ServerInstance->Modules->Attach(eventlist, this, 2);
+               ServerInstance->Modules->Attach(eventlist, this, sizeof(eventlist)/sizeof(Implementation));
        }