diff options
author | Adam <Adam@anope.org> | 2015-09-17 10:07:30 -0400 |
---|---|---|
committer | Adam <Adam@anope.org> | 2015-09-17 10:07:30 -0400 |
commit | 1ac4a1d9a56141d18b3e8a32fe165535031a4c67 (patch) | |
tree | 5ee8af16acaaad7307732213afaf9eaa333a76d2 /src/bots.cpp | |
parent | 8d13a355cd9b851b5cf9f6012c77b2af68a039f1 (diff) |
Defer channel deletion until after i/o. There are some edge cases with events kicking users mid-event that can delete them.
Diffstat (limited to 'src/bots.cpp')
-rw-r--r-- | src/bots.cpp | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/src/bots.cpp b/src/bots.cpp index c6a726855..bc8b75594 100644 --- a/src/bots.cpp +++ b/src/bots.cpp @@ -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) |