1
0
mirror of https://github.com/anope/anope.git synced 2026-07-02 18:53:12 +02:00

Defer channel deletion until after i/o. There are some edge cases with events kicking users mid-event that can delete them.

This commit is contained in:
Adam
2015-09-17 10:07:30 -04:00
parent 8d13a355cd
commit 1ac4a1d9a5
5 changed files with 26 additions and 14 deletions
+1 -4
View File
@@ -219,12 +219,9 @@ void BotInfo::Part(Channel *c, const Anope::string &reason)
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, cref, cname, reason));
FOREACH_MOD(OnPartChannel, (this, c, c->name, reason));
}
void BotInfo::OnMessage(User *u, const Anope::string &message)