summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorAttila Molnar <attilamolnar@hush.com>2015-12-28 17:27:40 +0100
committerAttila Molnar <attilamolnar@hush.com>2015-12-28 17:27:40 +0100
commite17fcc226b04ea62c6ab4444bc1175a93f5fce57 (patch)
tree7c772c3e941be1d9aee6e154960f537d80dcb703 /src
parent419537e7453928af2fde6648e87085a27e443486 (diff)
Return true from Channel::PartUser() if the user was on the channel
Diffstat (limited to 'src')
-rw-r--r--src/channels.cpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/channels.cpp b/src/channels.cpp
index da5f4fd75..99da00708 100644
--- a/src/channels.cpp
+++ b/src/channels.cpp
@@ -405,12 +405,12 @@ ModResult Channel::GetExtBanStatus(User *user, char type)
* Remove a channel from a users record, remove the reference to the Membership object
* from the channel and destroy it.
*/
-void Channel::PartUser(User *user, std::string &reason)
+bool Channel::PartUser(User* user, std::string& reason)
{
MemberMap::iterator membiter = userlist.find(user);
if (membiter == userlist.end())
- return;
+ return false;
Membership* memb = membiter->second;
CUList except_list;
@@ -422,6 +422,8 @@ void Channel::PartUser(User *user, std::string &reason)
user->chans.erase(memb);
// Remove the Membership from this channel's userlist and destroy it
this->DelUser(membiter);
+
+ return true;
}
void Channel::KickUser(User* src, const MemberMap::iterator& victimiter, const std::string& reason)