summaryrefslogtreecommitdiff
path: root/src/bots.cpp
diff options
context:
space:
mode:
authorAdam <Adam@anope.org>2010-12-17 03:09:51 -0500
committerAdam <Adam@anope.org>2010-12-17 03:09:51 -0500
commit7f9a5e01c69c7e7ede69c3799ff2be0402f6d7fa (patch)
tree4cba444981240d170f49f14ad38d81fad7aa67cc /src/bots.cpp
parenteb9b12ed113a238662000cf9ff38e4762a3595a1 (diff)
NULL the core *serv pointers when core clients are deleted
Diffstat (limited to 'src/bots.cpp')
-rw-r--r--src/bots.cpp18
1 files changed, 18 insertions, 0 deletions
diff --git a/src/bots.cpp b/src/bots.cpp
index 098404ceb..87a646923 100644
--- a/src/bots.cpp
+++ b/src/bots.cpp
@@ -75,6 +75,24 @@ BotInfo::~BotInfo()
BotListByNick.erase(this->nick);
if (!this->uid.empty())
BotListByUID.erase(this->uid);
+
+ if (this->HasFlag(BI_CORE))
+ {
+ if (this == ChanServ)
+ ChanServ = NULL;
+ else if (this == BotServ)
+ BotServ = NULL;
+ else if (this == HostServ)
+ HostServ = NULL;
+ else if (this == OperServ)
+ OperServ = NULL;
+ else if (this == MemoServ)
+ MemoServ = NULL;
+ else if (this == NickServ)
+ NickServ = NULL;
+ else if (this == Global)
+ Global = NULL;
+ }
}