diff options
author | Adam <Adam@anope.org> | 2011-08-08 20:34:27 -0400 |
---|---|---|
committer | Adam <Adam@anope.org> | 2011-08-08 20:34:27 -0400 |
commit | 2d591f7f594ff3a8389a4d8cb7f1f60c7b390344 (patch) | |
tree | 32b1dd0373c9d4c844c20cd90cc09314e9e2be47 /src/main.cpp | |
parent | 9cb96f3bfbde4939fe0b22c9de989c83d4bdb1cd (diff) |
When we split from the uplink send a quit for *all* of our clients not just bots
Diffstat (limited to 'src/main.cpp')
-rw-r--r-- | src/main.cpp | 23 |
1 files changed, 7 insertions, 16 deletions
diff --git a/src/main.cpp b/src/main.cpp index c3b606246..f4316d6e0 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -122,23 +122,13 @@ class UplinkSocket : public ConnectionSocket { FOREACH_MOD(I_OnServerDisconnect, OnServerDisconnect()); - /* Send a quit for all of our bots */ - for (Anope::insensitive_map<BotInfo *>::const_iterator it = BotListByNick.begin(), it_end = BotListByNick.end(); it != it_end; ++it) - { - BotInfo *bi = it->second; - - /* Don't use quitmsg here, it may contain information you don't want people to see */ - ircdproto->SendQuit(bi, "Shutting down"); - } - - /* Clear all of our users, but not our bots */ - for (Anope::insensitive_map<User *>::const_iterator it = UserListByNick.begin(); it != UserListByNick.end();) + for (Anope::insensitive_map<User *>::const_iterator it = UserListByNick.begin(); it != UserListByNick.end(); ++it) { User *u = it->second; - ++it; - if (u->server != Me) - delete u; + if (u->server == Me) + /* Don't use quitmsg here, it may contain information you don't want people to see */ + ircdproto->SendQuit(u, "Shutting down"); } ircdproto->SendSquit(Config->ServerName, quitmsg); @@ -146,13 +136,14 @@ class UplinkSocket : public ConnectionSocket this->ProcessWrite(); // Write out the last bit } - Me->SetFlag(SERVER_SYNCING); for (unsigned i = Me->GetLinks().size(); i > 0; --i) if (!Me->GetLinks()[i - 1]->HasFlag(SERVER_JUPED)) - delete Me->GetLinks()[i - 1]; + Me->GetLinks()[i - 1]->Delete(Me->GetName() + " " + Me->GetLinks()[i - 1]->GetName()); UplinkSock = NULL; + Me->SetFlag(SERVER_SYNCING); + if (!quitting) { int Retry = Config->RetryWait; |