diff options
author | Adam <Adam@anope.org> | 2010-12-29 19:59:26 -0500 |
---|---|---|
committer | Adam <Adam@anope.org> | 2010-12-29 19:59:26 -0500 |
commit | a36f14c1bfca63ba744ab310af775cf6d5b81179 (patch) | |
tree | 699fefdd972c23799117a44f3ddab3606c324d4b /src/bots.cpp | |
parent | 16cab979da3330f87c3fb6a23c849a028b8ab594 (diff) |
Automatically quit bots when they are deleted
Diffstat (limited to 'src/bots.cpp')
-rw-r--r-- | src/bots.cpp | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/bots.cpp b/src/bots.cpp index 07ea91b3a..1f7b118d8 100644 --- a/src/bots.cpp +++ b/src/bots.cpp @@ -64,6 +64,14 @@ BotInfo::BotInfo(const Anope::string &nnick, const Anope::string &nuser, const A BotInfo::~BotInfo() { + // If we're synchronised with the uplink already, send the bot. + if (Me && Me->IsSynced()) + { + ircdproto->SendQuit(this, NULL); + XLine x(this->nick); + ircdproto->SendSQLineDel(&x); + } + for (registered_channel_map::const_iterator it = RegisteredChannelList.begin(), it_end = RegisteredChannelList.end(); it != it_end; ++it) { ChannelInfo *ci = it->second; |