X-Git-Url: https://git.netwichtig.de/gitweb/?a=blobdiff_plain;f=src%2Fserver.cpp;h=191a3d30ffd21812a8a0e596ac3399ddd34ea4df;hb=0cfe4a848b06d8b8b277a7afc90ceabcaa50d9fa;hp=66466fae94cbdbbd65e86566c1526b0370eee561;hpb=5043a2f83598baa3afba53201f690e6deac3eafd;p=user%2Fhenk%2Fcode%2Finspircd.git diff --git a/src/server.cpp b/src/server.cpp index 66466fae9..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); } @@ -198,10 +194,9 @@ void ISupportManager::Build() } // 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); }