summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorAdam <Adam@anope.org>2014-05-30 20:56:40 -0400
committerAdam <Adam@anope.org>2014-05-30 20:57:23 -0400
commit4d8e3b847d4ecd532643d5cb0925a2d701c84b23 (patch)
tree15c67c15f485f7222a2bb9711069facb77b543c0 /src
parenteaade23f9bcd211461093ae1f08da30873123fa9 (diff)
Fix f627a3bacd0d058e94260dac1555790cafd9a926, really make BotInfo::Part fire events like the normal user part message does
Diffstat (limited to 'src')
-rw-r--r--src/bots.cpp7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/bots.cpp b/src/bots.cpp
index 16e6a1cf9..85e605f21 100644
--- a/src/bots.cpp
+++ b/src/bots.cpp
@@ -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)