X-Git-Url: https://git.netwichtig.de/gitweb/?a=blobdiff_plain;f=src%2Fserver.cpp;h=ceefa438798f94ad19b0334ed6bfa6f4f20c6c72;hb=b9006ce3cba742ca2a22d601ba1a63a47b0402c9;hp=ab53692315dd33f8325738ce10001d9c6c16289e;hpb=b071a6acd805bde6119a66481768be13102d1c2b;p=user%2Fhenk%2Fcode%2Finspircd.git diff --git a/src/server.cpp b/src/server.cpp index ab5369231..ceefa4387 100644 --- a/src/server.cpp +++ b/src/server.cpp @@ -193,15 +193,14 @@ void ISupportManager::Build() std::map::iterator extban = tokens.find("EXTBAN"); if (extban != tokens.end()) { - sort(extban->second.begin(), extban->second.end()); + std::sort(extban->second.begin(), extban->second.end()); extban->second.insert(0, ","); } // Transform the map into a list of lines, ready to be sent to clients - std::vector& lines = this->Lines; std::string line; unsigned int token_count = 0; - lines.clear(); + cachedlines.clear(); for (std::map::const_iterator it = tokens.begin(); it != tokens.end(); ++it) { @@ -220,7 +219,7 @@ void ISupportManager::Build() // Reached maximum number of tokens for this line or the current token // is the last one; finalize the line and store it for later use line.append(":are supported by this server"); - lines.push_back(line); + cachedlines.push_back(line); line.clear(); } } @@ -228,6 +227,6 @@ void ISupportManager::Build() void ISupportManager::SendTo(LocalUser* user) { - for (std::vector::const_iterator i = this->Lines.begin(); i != this->Lines.end(); ++i) + for (std::vector::const_iterator i = cachedlines.begin(); i != cachedlines.end(); ++i) user->WriteNumeric(RPL_ISUPPORT, *i); }