summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--include/u_listmode.h7
-rw-r--r--src/modules/m_banredirect.cpp7
-rw-r--r--src/modules/m_chanprotect.cpp6
-rw-r--r--src/modules/m_spanningtree/fjoin.cpp11
4 files changed, 10 insertions, 21 deletions
diff --git a/include/u_listmode.h b/include/u_listmode.h
index 721246027..eb3cf18b7 100644
--- a/include/u_listmode.h
+++ b/include/u_listmode.h
@@ -217,12 +217,9 @@ class ListModeBase : public ModeHandler
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());
}
}
}
diff --git a/src/modules/m_banredirect.cpp b/src/modules/m_banredirect.cpp
index a589d5c71..2269f2421 100644
--- a/src/modules/m_banredirect.cpp
+++ b/src/modules/m_banredirect.cpp
@@ -240,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;
diff --git a/src/modules/m_chanprotect.cpp b/src/modules/m_chanprotect.cpp
index ca331b0cf..65bd2eed1 100644
--- a/src/modules/m_chanprotect.cpp
+++ b/src/modules/m_chanprotect.cpp
@@ -88,11 +88,9 @@ class FounderProtectBase
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());
MyInstance->SendMode(mode_junk, MyInstance->FakeClient);
+ mode_junk.erase(mode_junk.begin() + 1, mode_junk.end());
}
}
diff --git a/src/modules/m_spanningtree/fjoin.cpp b/src/modules/m_spanningtree/fjoin.cpp
index e2656a694..b9bd79f18 100644
--- a/src/modules/m_spanningtree/fjoin.cpp
+++ b/src/modules/m_spanningtree/fjoin.cpp
@@ -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;