X-Git-Url: https://git.netwichtig.de/gitweb/?a=blobdiff_plain;f=include%2Fu_listmode.h;h=eb3cf18b7e2694c4c9d3ecae59792a2735fad226;hb=fa3e1d5d4d803840b6bf06d9116353fab55fc686;hp=b08ad8d4dc82ec131cc8f20c9fc8b3877168688e;hpb=f209cce90b394acd26e22eacef0bff61e8f5b4e1;p=user%2Fhenk%2Fcode%2Finspircd.git diff --git a/include/u_listmode.h b/include/u_listmode.h index b08ad8d4d..eb3cf18b7 100644 --- a/include/u_listmode.h +++ b/include/u_listmode.h @@ -3,7 +3,7 @@ * +------------------------------------+ * * InspIRCd: (C) 2002-2009 InspIRCd Development Team - * See: http://www.inspircd.org/wiki/index.php/Credits + * See: http://wiki.inspircd.org/Credits * * This program is free but copyrighted software; see * the file COPYING for details. @@ -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()); } } } @@ -423,6 +420,8 @@ class ListModeBase : public ModeHandler chan->GetExt(infokey, mlist); irc::modestacker modestack(ServerInstance, true); std::deque stackresult; + std::deque types; + types.push_back(TR_TEXT); if (mlist) { for (modelist::iterator it = mlist->begin(); it != mlist->end(); it++) @@ -432,9 +431,8 @@ class ListModeBase : public ModeHandler } while (modestack.GetStackedLine(stackresult)) { - irc::stringjoiner mode_join(" ", stackresult, 0, stackresult.size() - 1); - std::string line = mode_join.GetJoined(); - proto->ProtoSendMode(opaque, TYPE_CHANNEL, chan, line); + types.assign(stackresult.size(), this->GetTranslateType()); + proto->ProtoSendMode(opaque, TYPE_CHANNEL, chan, stackresult, types); } }