1
0
mirror of https://github.com/anope/anope.git synced 2026-06-30 13:46:38 +02:00

Fix f627a3bacd, really make BotInfo::Part fire events like the normal user part message does

This commit is contained in:
Adam
2014-05-30 20:56:40 -04:00
parent eaade23f9b
commit 4d8e3b847d
+6 -1
View File
@@ -213,11 +213,16 @@ void BotInfo::Part(Channel *c, const Anope::string &reason)
if (c->FindUser(this) == NULL)
return;
FOREACH_MOD(OnPrePartChannel, (this, c));
IRCD->SendPart(this, c, "%s", !reason.empty() ? reason.c_str() : "");
Anope::string cname = c->name;
Reference<Channel> cref = c;
c->DeleteUser(this);
FOREACH_MOD(OnPartChannel, (this, c, c->name, reason));
FOREACH_MOD(OnPartChannel, (this, cref, cname, reason));
}
void BotInfo::OnMessage(User *u, const Anope::string &message)