]> git.netwichtig.de Git - user/henk/code/inspircd.git/blobdiff - src/modules/m_nokicks.cpp
Merge insp20
[user/henk/code/inspircd.git] / src / modules / m_nokicks.cpp
index a17e6eb35e92eb81474109bcadd6140341784fce..1be389bf767ab53c044393ac885b5a866f883876 100644 (file)
@@ -42,15 +42,14 @@ class ModuleNoKicks : public Module
 
        void init()
        {
-               if (!ServerInstance->Modes->AddMode(&nk))
-                       throw ModuleException("Could not add new modes!");
+               ServerInstance->Modules->AddService(nk);
                Implementation eventlist[] = { I_OnUserPreKick, I_On005Numeric };
                ServerInstance->Modules->Attach(eventlist, this, sizeof(eventlist)/sizeof(Implementation));
        }
 
-       void On005Numeric(std::string &output)
+       void On005Numeric(std::map<std::string, std::string>& tokens)
        {
-               ServerInstance->AddExtBanChar('Q');
+               tokens["EXTBAN"].push_back('Q');
        }
 
        ModResult OnUserPreKick(User* source, Membership* memb, const std::string &reason)
@@ -64,15 +63,10 @@ class ModuleNoKicks : public Module
                return MOD_RES_PASSTHRU;
        }
 
-       ~ModuleNoKicks()
-       {
-       }
-
        Version GetVersion()
        {
                return Version("Provides channel mode +Q to prevent kicks on the channel.", VF_VENDOR);
        }
 };
 
-
 MODULE_INIT(ModuleNoKicks)