1
0
mirror of https://github.com/anope/anope.git synced 2026-07-03 01:03:11 +02:00

When we split from the uplink send a quit for *all* of our clients not just bots

This commit is contained in:
Adam
2011-08-08 20:34:27 -04:00
parent 9cb96f3bfb
commit 2d591f7f59
+7 -16
View File
@@ -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;