]> git.netwichtig.de Git - user/henk/code/inspircd.git/blobdiff - src/modules/m_nokicks.cpp
Only valid targets for encap are now server ids
[user/henk/code/inspircd.git] / src / modules / m_nokicks.cpp
index e3da7f71330a525d02112589db85fc28b35e47aa..0692048f16c5d14c4c4d4131adf69b1c15237072 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,16 +55,12 @@ 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);
        }
 
-       void Implements(char* List)
-       {
-               List[I_OnAccessCheck] = 1;
-       }
 
        virtual int OnAccessCheck(User* source,User* dest,Channel* channel,int access_type)
        {