diff options
-rw-r--r-- | src/servers.cpp | 19 |
1 files changed, 8 insertions, 11 deletions
diff --git a/src/servers.cpp b/src/servers.cpp index 2f87d66e4..971ee83d9 100644 --- a/src/servers.cpp +++ b/src/servers.cpp @@ -125,22 +125,19 @@ Server::~Server() { Log(this, "quit") << "quit from " << (this->uplink ? this->uplink->GetName() : "no uplink") << " for " << this->quit_reason; - if (Servers::Capab.count("NOQUIT") > 0 || Servers::Capab.count("QS") > 0) + for (user_map::const_iterator it = UserListByNick.begin(); it != UserListByNick.end(); ++it) { - for (user_map::const_iterator it = UserListByNick.begin(); it != UserListByNick.end(); ++it) - { - User *u = it->second; + User *u = it->second; - if (u->server == this) - { - u->Quit(this->quit_reason); - u->server = NULL; - } + if (u->server == this) + { + u->Quit(this->quit_reason); + u->server = NULL; } - - Log(LOG_DEBUG) << "Finished removing all users for " << this->GetName(); } + Log(LOG_DEBUG) << "Finished removing all users for " << this->GetName(); + if (this->uplink) this->uplink->DelLink(this); |