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-24 20:04:37 -0500
commit75098739e60e4dda2e1465e35aaf65cf9e21041f (patch)
treee2497dbad716bd059ecb0d7bd21c1eda224ca40d /src/bots.cpp
parent12d6e2ef3fb8489d2ac2666d25cc148005004068 (diff)
NULL the core *serv pointers when core clients are deleted
(cherry picked from commit 7f9a5e01c69c7e7ede69c3799ff2be0402f6d7fa)
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 e1d70d05a..33f871f1b 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;
+ }
}