]> git.netwichtig.de Git - user/henk/code/inspircd.git/blobdiff - src/modules/m_spanningtree/fjoin.cpp
Addendum to previous ping patch: NextPingTime was not being set at endburst, and...
[user/henk/code/inspircd.git] / src / modules / m_spanningtree / fjoin.cpp
index e2656a694e0419445fab4e3ef340d48fa5c61e93..b9bd79f18764089a708157782d14c569eb2ff2c0 100644 (file)
@@ -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]);
-                       }
+                       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());
                }
        }
 
@@ -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]);
-
+                       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());
                }
        }
        return true;