summaryrefslogtreecommitdiff
path: root/src/bots.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/bots.cpp')
-rw-r--r--src/bots.cpp5
1 files changed, 1 insertions, 4 deletions
diff --git a/src/bots.cpp b/src/bots.cpp
index 205b0841c..f934676bb 100644
--- a/src/bots.cpp
+++ b/src/bots.cpp
@@ -174,12 +174,9 @@ void ServiceBot::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);
- Event::OnPartChannel(&Event::PartChannel::OnPartChannel, this, cref, cname, reason);
+ Event::OnPartChannel(&Event::PartChannel::OnPartChannel, this, c, c->name, reason);
}
void ServiceBot::OnMessage(User *u, const Anope::string &message)