mirror of
https://github.com/inspircd/inspircd.git
synced 2025-04-01 13:50:04 -04:00
m_banredirect Fix modestack usage
This commit is contained in:
parent
3556132879
commit
79f46c80c2
@ -244,9 +244,6 @@ class ModuleBanRedirect : public Module
|
|||||||
if(redirects)
|
if(redirects)
|
||||||
{
|
{
|
||||||
irc::modestacker modestack(false);
|
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++)
|
for(BanRedirectList::iterator i = redirects->begin(); i != redirects->end(); i++)
|
||||||
{
|
{
|
||||||
@ -259,11 +256,12 @@ class ModuleBanRedirect : public Module
|
|||||||
modestack.Push('b', i->banmask);
|
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->Modes->Process(stackresult, ServerInstance->FakeClient);
|
||||||
ServerInstance->SendMode(mode_junk, ServerInstance->FakeClient);
|
stackresult.erase(stackresult.begin() + 1, stackresult.end());
|
||||||
mode_junk.erase(mode_junk.begin() + 1, mode_junk.end());
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user