]> git.netwichtig.de Git - user/henk/code/inspircd.git/blobdiff - src/modules/m_redirect.cpp
Move some unused modules to -extras
[user/henk/code/inspircd.git] / src / modules / m_redirect.cpp
index 50d2e929fdff37722c4e159cfbb5987e9d37c73d..c6695f80ea4dcadde2719772ca08002a43688520 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
@@ -53,6 +53,8 @@ class Redirect : public ModeHandler
                                }
                        }
 
+                       if (channel->GetModeParameter('L') == parameter)
+                               return MODEACTION_DENY;
                        /*
                         * We used to do some checking for circular +L here, but there is no real need for this any more especially as we
                         * now catch +L looping in PreJoin. Remove it, since O(n) logic makes me sad, and we catch it anyway. :) -- w00t
@@ -96,7 +98,7 @@ class ModuleRedirect : public Module
        {
                if (chan)
                {
-                       if (chan->IsModeSet('L') && chan->modes[CM_LIMIT])
+                       if (chan->IsModeSet('L') && chan->IsModeSet('l'))
                        {
                                if (chan->GetUserCounter() >= atoi(chan->GetModeParameter('l').c_str()))
                                {
@@ -126,7 +128,7 @@ class ModuleRedirect : public Module
 
        virtual Version GetVersion()
        {
-               return Version("Provides channel mode +L (limit redirection)", VF_COMMON | VF_VENDOR);
+               return Version("Provides channel mode +L (limit redirection)", VF_VENDOR);
        }
 };