diff options
author | Adam <Adam@drink-coca-cola.info> | 2010-05-14 20:55:31 -0400 |
---|---|---|
committer | Adam <Adam@anope.org> | 2010-06-18 21:01:55 -0400 |
commit | c966d7ec17690037a597e1d8908782de376f3052 (patch) | |
tree | 0b72fe268e4a1865ff19893545e807595a3cb213 | |
parent | f049124905bd9f53439293e873003cb027a17b91 (diff) |
Send a QUIT before we shutdown or restart for all of our bots
-rw-r--r-- | src/main.c | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/src/main.c b/src/main.c index e14ca373e..7a00e1e36 100644 --- a/src/main.c +++ b/src/main.c @@ -198,6 +198,12 @@ void do_restart_services() if (!quitmsg) quitmsg = "Restarting"; + /* Send a quit for all of our bots */ + for (botinfo_map::const_iterator it = BotList.begin(); it != BotList.end(); ++it) + { + /* Don't use quitmsg here, it may contain information you don't want people to see */ + ircdproto->SendQuit(it->second, "Restarting"); + } ircdproto->SendSquit(Config.ServerName, quitmsg); /* Process to send the last bits of information before disconnecting */ socketEngine.Process(); @@ -232,6 +238,13 @@ static void services_shutdown() Alog() << quitmsg; if (started && UplinkSock) { + /* Send a quit for all of our bots */ + for (botinfo_map::const_iterator it = BotList.begin(); it != BotList.end(); ++it) + { + /* Don't use quitmsg here, it may contain information you don't want people to see */ + ircdproto->SendQuit(it->second, "Shutting down"); + } + ircdproto->SendSquit(Config.ServerName, quitmsg); while (!UserListByNick.empty()) |