X-Git-Url: https://git.netwichtig.de/gitweb/?a=blobdiff_plain;f=src%2Fserver.cpp;h=191a3d30ffd21812a8a0e596ac3399ddd34ea4df;hb=6b2438f548aa8b2b2c26b94a8f782a11e87370be;hp=ac638a08c17ca42771b23b10fbf67645ecdf965c;hpb=e3bcf95ee996c058c73879c12ac5a487f8dcdf46;p=user%2Fhenk%2Fcode%2Finspircd.git diff --git a/src/server.cpp b/src/server.cpp index ac638a08c..191a3d30f 100644 --- a/src/server.cpp +++ b/src/server.cpp @@ -46,13 +46,9 @@ void InspIRCd::Exit(int status) #ifdef _WIN32 SetServiceStopped(status); #endif - if (this) - { - this->SendError("Exiting with status " + ConvToStr(status) + " (" + std::string(ExitCodes[status]) + ")"); - this->Cleanup(); - delete this; - ServerInstance = NULL; - } + this->Cleanup(); + ServerInstance = NULL; + delete this; exit (status); } @@ -61,7 +57,7 @@ void InspIRCd::Rehash(const std::string& uuid) if (!ServerInstance->ConfigThread) { ServerInstance->ConfigThread = new ConfigReaderThread(uuid); - ServerInstance->Threads->Start(ServerInstance->ConfigThread); + ServerInstance->Threads.Start(ServerInstance->ConfigThread); } } @@ -193,15 +189,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 +215,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 +223,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); }