]> git.netwichtig.de Git - user/henk/code/inspircd.git/blobdiff - src/modules/m_nokicks.cpp
Patch to fix timedbans crash reported earlier today, thanks for the headsup wonderwal
[user/henk/code/inspircd.git] / src / modules / m_nokicks.cpp
index 4e8a24701ac15c8550ab3163015fac72c2e65124..0806b2d56b1094fad9f327879a405be5e117368f 100644 (file)
@@ -2,7 +2,7 @@
  *       | Inspire Internet Relay Chat Daemon |
  *       +------------------------------------+
  *
- *  InspIRCd: (C) 2002-2007 InspIRCd Development Team
+ *  InspIRCd: (C) 2002-2008 InspIRCd Development Team
  * See: http://www.inspircd.org/wiki/index.php/Credits
  *
  * This program is free but copyrighted software; see
@@ -20,7 +20,7 @@ class NoKicks : public ModeHandler
  public:
        NoKicks(InspIRCd* Instance) : ModeHandler(Instance, 'Q', 0, 0, false, MODETYPE_CHANNEL, false) { }
 
-       ModeAction OnModeChange(User* source, User* dest, Channel* channel, std::string &parameter, bool adding)
+       ModeAction OnModeChange(User* source, User* dest, Channel* channel, std::string &parameter, bool adding, bool)
        {
                if (adding)
                {
@@ -55,7 +55,7 @@ class ModuleNoKicks : public Module
        {
                
                nk = new NoKicks(ServerInstance);
-               if (!ServerInstance->AddMode(nk))
+               if (!ServerInstance->Modes->AddMode(nk))
                        throw ModuleException("Could not add new modes!");
                Implementation eventlist[] = { I_OnAccessCheck };
                ServerInstance->Modules->Attach(eventlist, this, 1);
@@ -76,7 +76,7 @@ class ModuleNoKicks : public Module
                                else
                                {
                                        // nobody else can (not even opers with override, and founders)
-                                       source->WriteServ("484 %s %s :Can't kick user %s from channel (+Q set)",source->nick, channel->name,dest->nick);
+                                       source->WriteNumeric(484, "%s %s :Can't kick user %s from channel (+Q set)",source->nick, channel->name,dest->nick);
                                        return ACR_DENY;
                                }
                        }
@@ -92,7 +92,7 @@ class ModuleNoKicks : public Module
        
        virtual Version GetVersion()
        {
-               return Version(1,1,0,0,VF_COMMON|VF_VENDOR,API_VERSION);
+               return Version(1,2,0,0,VF_COMMON|VF_VENDOR,API_VERSION);
        }
 };