]> git.netwichtig.de Git - user/henk/code/inspircd.git/blobdiff - src/modules/m_ojoin.cpp
Fix iteration of oper blocks by SSLINFO
[user/henk/code/inspircd.git] / src / modules / m_ojoin.cpp
index a98c5e01d46e4a38e8a6965842668ea343a2b0b0..176a0e613e648259b9ea960080e7bf562a4d12b6 100644 (file)
@@ -211,6 +211,10 @@ class ModuleOjoin : public Module
 
        ModuleOjoin()
                : np(NULL), mycommand(this)
+       {
+       }
+
+       void init()
        {
                /* Load config stuff */
                OnRehash(NULL);
@@ -218,13 +222,8 @@ class ModuleOjoin : public Module
                /* Initialise module variables */
                np = new NetworkPrefix(this);
 
-               if (!ServerInstance->Modes->AddMode(np))
-               {
-                       delete np;
-                       throw ModuleException("Could not add new mode!");
-               }
-
-               ServerInstance->AddCommand(&mycommand);
+               ServerInstance->Modules->AddService(*np);
+               ServerInstance->Modules->AddService(mycommand);
 
                Implementation eventlist[] = { I_OnUserPreJoin, I_OnUserPreKick, I_OnRehash };
                ServerInstance->Modules->Attach(eventlist, this, 3);
@@ -290,7 +289,7 @@ class ModuleOjoin : public Module
 
        Version GetVersion()
        {
-               return Version("Network Buisness Join", VF_COMMON | VF_VENDOR);
+               return Version("Network Buisness Join", VF_VENDOR);
        }
 };