X-Git-Url: https://git.netwichtig.de/gitweb/?a=blobdiff_plain;f=include%2Fu_listmode.h;h=0a2c25710568235ea65fc90211f25c64ef0456fe;hb=219993bc9018d9f0d9568330d7a972b68b785d27;hp=eb3cf18b7e2694c4c9d3ecae59792a2735fad226;hpb=2630a87bb13b089e6d0fdcff4bcd0f3a9612e52f;p=user%2Fhenk%2Fcode%2Finspircd.git diff --git a/include/u_listmode.h b/include/u_listmode.h index eb3cf18b7..0a2c25710 100644 --- a/include/u_listmode.h +++ b/include/u_listmode.h @@ -200,9 +200,6 @@ class ListModeBase : public ModeHandler if (el) { irc::modestacker modestack(ServerInstance, false); - std::deque stackresult; - std::vector mode_junk; - mode_junk.push_back(channel->name); for (modelist::iterator it = el->begin(); it != el->end(); it++) { @@ -215,11 +212,13 @@ class ListModeBase : public ModeHandler if (stack) return; + std::vector stackresult; + stackresult.push_back(channel->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->SendMode(stackresult, ServerInstance->FakeClient); + stackresult.clear(); + stackresult.push_back(channel->name); } } } @@ -419,8 +418,8 @@ class ListModeBase : public ModeHandler modelist* mlist; chan->GetExt(infokey, mlist); irc::modestacker modestack(ServerInstance, true); - std::deque stackresult; - std::deque types; + std::vector stackresult; + std::vector types; types.push_back(TR_TEXT); if (mlist) { @@ -433,6 +432,7 @@ class ListModeBase : public ModeHandler { types.assign(stackresult.size(), this->GetTranslateType()); proto->ProtoSendMode(opaque, TYPE_CHANNEL, chan, stackresult, types); + stackresult.clear(); } }