diff options
author | Attila Molnar <attilamolnar@hush.com> | 2014-06-10 17:45:41 +0200 |
---|---|---|
committer | Attila Molnar <attilamolnar@hush.com> | 2014-06-10 17:45:41 +0200 |
commit | 106c0889b392a86bacd1ac0756f0087ce184f685 (patch) | |
tree | caf0008687ef65d7250cec1eb36e9bfe256afbd7 /src/channels.cpp | |
parent | ad6a02809585ac1ad805e66b8aa0113815d9a957 (diff) |
Return the newly created Membership object from Channel::ForceJoin()
Diffstat (limited to 'src/channels.cpp')
-rw-r--r-- | src/channels.cpp | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/src/channels.cpp b/src/channels.cpp index 77b7f81db..6a864fafe 100644 --- a/src/channels.cpp +++ b/src/channels.cpp @@ -292,17 +292,17 @@ Channel* Channel::JoinUser(LocalUser* user, std::string cname, bool override, co return chan; } -void Channel::ForceJoin(User* user, const std::string* privs, bool bursting, bool created_by_local) +Membership* Channel::ForceJoin(User* user, const std::string* privs, bool bursting, bool created_by_local) { if (IS_SERVER(user)) { ServerInstance->Logs->Log("CHANNELS", LOG_DEBUG, "Attempted to join server user " + user->uuid + " to channel " + this->name); - return; + return NULL; } Membership* memb = this->AddUser(user); if (!memb) - return; // Already on the channel + return NULL; // Already on the channel user->chans.push_front(memb); @@ -350,6 +350,7 @@ void Channel::ForceJoin(User* user, const std::string* privs, bool bursting, boo } FOREACH_MOD(OnPostJoin, (memb)); + return memb; } bool Channel::IsBanned(User* user) |