]> git.netwichtig.de Git - user/henk/code/inspircd.git/blobdiff - src/modules/m_noctcp.cpp
Release 2.0.15
[user/henk/code/inspircd.git] / src / modules / m_noctcp.cpp
index b6044b3fecadd4ca2640d189b4832e7a23ddcc51..1dd6fe34ad467d71617f55b52316685cc9b3e9b7 100644 (file)
@@ -39,10 +39,13 @@ class ModuleNoCTCP : public Module
        ModuleNoCTCP()
                : nc(this)
        {
-               if (!ServerInstance->Modes->AddMode(&nc))
-                       throw ModuleException("Could not add new modes!");
+       }
+
+       void init()
+       {
+               ServerInstance->Modules->AddService(nc);
                Implementation eventlist[] = { I_OnUserPreMessage, I_OnUserPreNotice, I_On005Numeric };
-               ServerInstance->Modules->Attach(eventlist, this, 3);
+               ServerInstance->Modules->Attach(eventlist, this, sizeof(eventlist)/sizeof(Implementation));
        }
 
        virtual ~ModuleNoCTCP()