summaryrefslogtreecommitdiff
path: root/src/channels.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/channels.cpp')
-rw-r--r--src/channels.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/channels.cpp b/src/channels.cpp
index 8b9e38e9c..77b7f81db 100644
--- a/src/channels.cpp
+++ b/src/channels.cpp
@@ -444,13 +444,13 @@ void Channel::PartUser(User *user, std::string &reason)
}
}
-void Channel::KickUser(User* src, User* victim, const std::string& reason, Membership* srcmemb)
+void Channel::KickUser(User* src, const UserMembIter& victimiter, const std::string& reason)
{
- UserMembIter victimiter = userlist.find(victim);
- Membership* memb = ((victimiter != userlist.end()) ? victimiter->second : NULL);
+ Membership* memb = victimiter->second;
CUList except_list;
FOREACH_MOD(OnUserKick, (src, memb, reason, except_list));
+ User* victim = memb->user;
WriteAllExcept(src, false, 0, except_list, "KICK %s %s :%s", name.c_str(), victim->nick.c_str(), reason.c_str());
victim->chans.erase(memb);