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:
+1
-4
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user