1
0
mirror of https://github.com/anope/anope.git synced 2026-06-12 19:34:48 +02:00

NULL the core *serv pointers when core clients are deleted

This commit is contained in:
Adam
2010-12-17 03:09:51 -05:00
parent eb9b12ed11
commit 7f9a5e01c6
+18
View File
@@ -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;
}
}