diff options
| author | Adam <Adam@anope.org> | 2010-06-27 02:41:48 -0400 |
|---|---|---|
| committer | Adam <Adam@anope.org> | 2010-06-27 02:41:48 -0400 |
| commit | 57caa0b53f53927c72811ffffda8bb527975860f (patch) | |
| tree | 7fef9b12d2d86758acb9198001f88f072e8a31d6 /src/main.cpp | |
| parent | d49aee6cf88c79220eb785245257544c8051247f (diff) | |
Made Anope track its own clients internally as if they were real users
Diffstat (limited to 'src/main.cpp')
| -rw-r--r-- | src/main.cpp | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/src/main.cpp b/src/main.cpp index 06f10ab3e..c00b3a8f0 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -179,8 +179,14 @@ void do_restart_services() quitmsg = "Restarting"; /* Send a quit for all of our bots */ for (botinfo_map::const_iterator it = BotListByNick.begin(), it_end = BotListByNick.end(); it != it_end; ++it) + { /* Don't use quitmsg here, it may contain information you don't want people to see */ ircdproto->SendQuit(it->second, "Restarting"); + /* Erase bots from the user list so they don't get nuked later on */ + UserListByNick.erase(it->second->nick.c_str()); + if (!it->second->GetUID().empty()) + UserListByUID.erase(it->second->GetUID().c_str()); + } ircdproto->SendSquit(Config.ServerName, quitmsg); /* Process to send the last bits of information before disconnecting */ socketEngine.Process(); @@ -218,8 +224,14 @@ static void services_shutdown() { /* Send a quit for all of our bots */ for (botinfo_map::const_iterator it = BotListByNick.begin(), it_end = BotListByNick.end(); it != it_end; ++it) + { /* Don't use quitmsg here, it may contain information you don't want people to see */ ircdproto->SendQuit(it->second, "Shutting down"); + /* Erase bots from the user list so they don't get nuked later on */ + UserListByNick.erase(it->second->nick.c_str()); + if (!it->second->GetUID().empty()) + UserListByUID.erase(it->second->GetUID()); + } ircdproto->SendSquit(Config.ServerName, quitmsg); |
