Skip to content

Commit

Permalink
Actually use irc::modestacker correctly
Browse files Browse the repository at this point in the history
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@11322 e03df62e-2008-0410-955e-edbf42e46eb7
  • Loading branch information
danieldg committed Apr 20, 2009
1 parent 828f256 commit e10bc5d
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 21 deletions.
7 changes: 2 additions & 5 deletions include/u_listmode.h
Expand Up @@ -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());
}
}
}
Expand Down
7 changes: 2 additions & 5 deletions src/modules/m_banredirect.cpp
Expand Up @@ -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;
Expand Down
6 changes: 2 additions & 4 deletions src/modules/m_chanprotect.cpp
Expand Up @@ -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());
}
}

Expand Down
11 changes: 4 additions & 7 deletions src/modules/m_spanningtree/fjoin.cpp
Expand Up @@ -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());
}
}

Expand Down Expand Up @@ -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;
Expand Down

0 comments on commit e10bc5d

Please sign in to comment.