]> git.netwichtig.de Git - user/henk/code/inspircd.git/blobdiff - src/modules/m_callerid.cpp
Fix TBAN not working if the banner is owner/protected
[user/henk/code/inspircd.git] / src / modules / m_callerid.cpp
index 86d488cd8d7d8920d0cd8c5349157c3f248df511..bb847d8bc27228048c07e2271f0520724539e30a 100644 (file)
@@ -344,13 +344,15 @@ private:
 public:
        ModuleCallerID() : cmd(this), myumode(this)
        {
-               OnRehash(NULL);
+       }
 
-               if (!ServerInstance->Modes->AddMode(&myumode))
-                       throw ModuleException("Could not add usermode +g");
+       void init()
+       {
+               OnRehash(NULL);
 
-               ServerInstance->AddCommand(&cmd);
-               ServerInstance->Extensions.Register(&cmd.extInfo);
+               ServerInstance->Modules->AddService(myumode);
+               ServerInstance->Modules->AddService(cmd);
+               ServerInstance->Modules->AddService(cmd.extInfo);
 
                Implementation eventlist[] = { I_OnRehash, I_OnUserPreNick, I_OnUserQuit, I_On005Numeric, I_OnUserPreNotice, I_OnUserPreMessage };
                ServerInstance->Modules->Attach(eventlist, this, 6);