diff options
author | Attila Molnar <attilamolnar@hush.com> | 2014-06-10 17:12:00 +0200 |
---|---|---|
committer | Attila Molnar <attilamolnar@hush.com> | 2014-06-10 17:12:00 +0200 |
commit | 854af2945eb6b9b62c19e3c823d3bcc8a84e52ae (patch) | |
tree | 3ccf9b4ae39f4ae7964a0391f6af7ee3045fb8e4 /include/channels.h | |
parent | bef2d3f462cacd978898235dc49a0a6c3bac0356 (diff) |
Change Channel::KickUser() to accept an iterator, add overload that accepts a User
Remove srcmemb parameter
Diffstat (limited to 'include/channels.h')
-rw-r--r-- | include/channels.h | 17 |
1 files changed, 14 insertions, 3 deletions
diff --git a/include/channels.h b/include/channels.h index 736ca2e98..cf7285210 100644 --- a/include/channels.h +++ b/include/channels.h @@ -178,11 +178,22 @@ class CoreExport Channel : public Extensible, public InviteBase<Channel> /** Make src kick user from this channel with the given reason. * @param src The source of the kick - * @param user The user being kicked (must be on this channel) + * @param victimiter Iterator to the user being kicked, must be valid * @param reason The reason for the kick - * @param srcmemb The membership of the user who does the kick, can be NULL */ - void KickUser(User* src, User* user, const std::string& reason, Membership* srcmemb = NULL); + void KickUser(User* src, const UserMembIter& victimiter, const std::string& reason); + + /** Make src kick user from this channel with the given reason. + * @param src The source of the kick + * @param user The user being kicked + * @param reason The reason for the kick + */ + void KickUser(User* src, User* user, const std::string& reason) + { + UserMembIter it = userlist.find(user); + if (it != userlist.end()) + KickUser(src, it, reason); + } /** Part a user from this channel with the given reason. * If the reason field is NULL, no reason will be sent. |