From 75098739e60e4dda2e1465e35aaf65cf9e21041f Mon Sep 17 00:00:00 2001 From: Adam Date: Fri, 17 Dec 2010 03:09:51 -0500 Subject: NULL the core *serv pointers when core clients are deleted (cherry picked from commit 7f9a5e01c69c7e7ede69c3799ff2be0402f6d7fa) --- src/bots.cpp | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) (limited to 'src') 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; + } } -- cgit