diff options
author | attilamolnar <attilamolnar@hush.com> | 2013-06-12 19:24:30 +0200 |
---|---|---|
committer | attilamolnar <attilamolnar@hush.com> | 2013-06-12 19:24:30 +0200 |
commit | 79f46c80c2df066e88c18322a2168a144087b811 (patch) | |
tree | cd9268462b4c452ea5f38cf450fa520e4e344bb7 | |
parent | 35561328798ef97026859d56f23e63b56438c01c (diff) |
m_banredirect Fix modestack usage
-rw-r--r-- | src/modules/m_banredirect.cpp | 12 |
1 files changed, 5 insertions, 7 deletions
diff --git a/src/modules/m_banredirect.cpp b/src/modules/m_banredirect.cpp index c79023ccf..08b2244d4 100644 --- a/src/modules/m_banredirect.cpp +++ b/src/modules/m_banredirect.cpp @@ -244,9 +244,6 @@ class ModuleBanRedirect : public Module if(redirects) { irc::modestacker modestack(false); - std::vector<std::string> stackresult; - std::vector<std::string> mode_junk; - mode_junk.push_back(chan->name); for(BanRedirectList::iterator i = redirects->begin(); i != redirects->end(); i++) { @@ -259,11 +256,12 @@ class ModuleBanRedirect : public Module modestack.Push('b', i->banmask); } - while(modestack.GetStackedLine(stackresult)) + std::vector<std::string> stackresult; + stackresult.push_back(chan->name); + while (modestack.GetStackedLine(stackresult)) { - 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()); + ServerInstance->Modes->Process(stackresult, ServerInstance->FakeClient); + stackresult.erase(stackresult.begin() + 1, stackresult.end()); } } } |