]> git.netwichtig.de Git - user/henk/code/inspircd.git/blobdiff - src/modules/m_banredirect.cpp
Add IP address conversion utility functions, irc::sockets::aptosa and irc::sockets...
[user/henk/code/inspircd.git] / src / modules / m_banredirect.cpp
index 1c8b47258807dd44aacbb619b8f3348d32db5932..2269f24216ddb5de6a6d6467a9e8b3c0049b08c1 100644 (file)
@@ -3,7 +3,7 @@
  *       +------------------------------------+
  *
  *  InspIRCd: (C) 2002-2009 InspIRCd Development Team
- * See: http://www.inspircd.org/wiki/index.php/Credits
+ * See: http://wiki.inspircd.org/Credits
  *
  * This program is free but copyrighted software; see
  *            the file COPYING for details.
@@ -37,11 +37,9 @@ typedef std::deque<std::string> StringDeque;
 
 class BanRedirect : public ModeWatcher
 {
- private:
-       InspIRCd* Srv;
  public:
        BanRedirect(InspIRCd* Instance)
-       : ModeWatcher(Instance, 'b', MODETYPE_CHANNEL), Srv(Instance)
+       : ModeWatcher(Instance, 'b', MODETYPE_CHANNEL)
        {
        }
 
@@ -118,7 +116,7 @@ class BanRedirect : public ModeWatcher
 
                        if(mask[CHAN].length())
                        {
-                               if(!IS_LOCAL(source) || Srv->IsChannel(mask[CHAN].c_str(), ServerInstance->Config->Limits.ChanMax))
+                               if(!IS_LOCAL(source) || ServerInstance->IsChannel(mask[CHAN].c_str(), ServerInstance->Config->Limits.ChanMax))
                                {
                                        if (assign(channel->name) == mask[CHAN])
                                        {
@@ -242,12 +240,9 @@ class ModuleBanRedirect : public Module
 
                                while(modestack.GetStackedLine(stackresult))
                                {
-                                       for(StringDeque::size_type i = 0; i < stackresult.size(); i++)
-                                       {
-                                               mode_junk.push_back(stackresult[i]);
-                                       }
-
+                                       mode_junk.insert(mode_junk.end(), stackresult.begin(), stackresult.end());
                                        ServerInstance->SendMode(mode_junk, ServerInstance->FakeClient);
+                                       mode_junk.erase(mode_junk.begin() + 1, mode_junk.end());
                                }
 
                                delete redirects;