]> git.netwichtig.de Git - user/henk/code/inspircd.git/blobdiff - src/modules/m_botmode.cpp
m_dccallow Add config option to control max entries on a list
[user/henk/code/inspircd.git] / src / modules / m_botmode.cpp
index 23094ddc55f0a4c4557aba85248513d48c87f12d..b29c58240689be37d9e86a4d8be12193c860ef11 100644 (file)
@@ -38,12 +38,14 @@ class ModuleBotMode : public Module
        ModuleBotMode()
                : bm(this)
        {
-               if (!ServerInstance->Modes->AddMode(&bm))
-                       throw ModuleException("Could not add new modes!");
-               Implementation eventlist[] = { I_OnWhois };
-               ServerInstance->Modules->Attach(eventlist, this, 1);
        }
 
+       void init()
+       {
+               ServerInstance->Modules->AddService(bm);
+               Implementation eventlist[] = { I_OnWhois };
+               ServerInstance->Modules->Attach(eventlist, this, sizeof(eventlist)/sizeof(Implementation));
+       }
 
        virtual ~ModuleBotMode()
        {