]> git.netwichtig.de Git - user/henk/code/inspircd.git/blobdiff - src/modules/m_nokicks.cpp
Add access checking for m_autoop
[user/henk/code/inspircd.git] / src / modules / m_nokicks.cpp
index b060d87f83f94538dc58c4607e9260ba8108d83b..0d5a012ef214ef6aa888784bb8a0ff2e5f6c59ed 100644 (file)
@@ -2,7 +2,7 @@
  *       | Inspire Internet Relay Chat Daemon |
  *       +------------------------------------+
  *
- *  InspIRCd: (C) 2002-2009 InspIRCd Development Team
+ *  InspIRCd: (C) 2002-2010 InspIRCd Development Team
  * See: http://wiki.inspircd.org/Credits
  *
  * This program is free but copyrighted software; see
@@ -18,7 +18,7 @@
 class NoKicks : public SimpleChannelModeHandler
 {
  public:
-       NoKicks(InspIRCd* Instance, Module* Creator) : SimpleChannelModeHandler(Instance, Creator, 'Q') { }
+       NoKicks(Module* Creator) : SimpleChannelModeHandler(Creator, "nokick", 'Q') { }
 };
 
 class ModuleNoKicks : public Module
@@ -26,8 +26,8 @@ class ModuleNoKicks : public Module
        NoKicks nk;
 
  public:
-       ModuleNoKicks(InspIRCd* Me)
-               : Module(Me), nk(Me, this)
+       ModuleNoKicks()
+               : nk(this)
        {
                if (!ServerInstance->Modes->AddMode(&nk))
                        throw ModuleException("Could not add new modes!");
@@ -44,7 +44,7 @@ class ModuleNoKicks : public Module
        {
                if (!memb->chan->GetExtBanStatus(source, 'Q').check(!memb->chan->IsModeSet('Q')))
                {
-                       if ((ServerInstance->ULine(source->nick.c_str())) || (ServerInstance->ULine(source->server)) || (!*source->server))
+                       if ((ServerInstance->ULine(source->nick.c_str())) || ServerInstance->ULine(source->server))
                        {
                                // ulines can still kick with +Q in place
                                return MOD_RES_PASSTHRU;
@@ -61,12 +61,11 @@ class ModuleNoKicks : public Module
 
        ~ModuleNoKicks()
        {
-               ServerInstance->Modes->DelMode(&nk);
        }
 
        Version GetVersion()
        {
-               return Version("Provides support for unreal-style channel mode +Q", VF_COMMON | VF_VENDOR, API_VERSION);
+               return Version("Provides support for unreal-style channel mode +Q", VF_VENDOR);
        }
 };