]> git.netwichtig.de Git - user/henk/code/inspircd.git/blobdiff - src/modules/m_spanningtree/fjoin.cpp
Use Utils->ServerUser instead of ServerInstance->FakeClient in m_spanningtree
[user/henk/code/inspircd.git] / src / modules / m_spanningtree / fjoin.cpp
index 96aeeb2559d378174c5dea8ed5671ed7f49c6bcb..28a922c0f56de341f52d7c8141d112dda27b87e1 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.
@@ -123,7 +123,7 @@ bool TreeSocket::ForceJoin(const std::string &source, std::deque<std::string> &p
                        modelist.push_back(params[idx]);
                }
 
-               this->ServerInstance->SendMode(modelist, this->ServerInstance->FakeClient);
+               this->ServerInstance->SendMode(modelist, Utils->ServerUser);
        }
 
        /* Now, process every 'modes,nick' pair */
@@ -168,7 +168,7 @@ bool TreeSocket::ForceJoin(const std::string &source, std::deque<std::string> &p
                                for (std::string::iterator x = modes.begin(); x != modes.end(); ++x)
                                        modestack.Push(*x, who->nick);
 
-                               Channel::JoinUser(this->ServerInstance, who, channel.c_str(), true, "", true, TS);
+                               Channel::JoinUser(this->ServerInstance, who, channel.c_str(), true, "", route_back_again->bursting, TS);
                        }
                        else
                        {
@@ -187,11 +187,9 @@ bool TreeSocket::ForceJoin(const std::string &source, std::deque<std::string> &p
 
                while (modestack.GetStackedLine(stackresult))
                {
-                       for (size_t j = 0; j < stackresult.size(); j++)
-                       {
-                               mode_junk.push_back(stackresult[j]);
-                       }
-                       ServerInstance->SendMode(mode_junk, ServerInstance->FakeClient);
+                       mode_junk.insert(mode_junk.end(), stackresult.begin(), stackresult.end());
+                       ServerInstance->SendMode(mode_junk, Utils->ServerUser);
+                       mode_junk.erase(mode_junk.begin() + 1, mode_junk.end());
                }
        }
 
@@ -226,10 +224,9 @@ bool TreeSocket::RemoveStatus(const std::string &prefix, std::deque<std::string>
 
                while (stack.GetStackedLine(stackresult))
                {
-                       for (size_t j = 0; j < stackresult.size(); j++)
-                               mode_junk.push_back(stackresult[j]);
-
-                       ServerInstance->SendMode(mode_junk, ServerInstance->FakeClient);
+                       mode_junk.insert(mode_junk.end(), stackresult.begin(), stackresult.end());
+                       ServerInstance->SendMode(mode_junk, Utils->ServerUser);
+                       mode_junk.erase(mode_junk.begin() + 1, mode_junk.end());
                }
        }
        return true;