From 80894752a760dbfb2fb44dfc8c7f8e317adba1c1 Mon Sep 17 00:00:00 2001 From: Sadie Powell Date: Thu, 22 Jun 2023 16:40:05 +0100 Subject: Make JoinUser return a Membership instead of a Channel. --- src/channels.cpp | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'src/channels.cpp') diff --git a/src/channels.cpp b/src/channels.cpp index 013f009f7..f3157b488 100644 --- a/src/channels.cpp +++ b/src/channels.cpp @@ -164,7 +164,7 @@ void Channel::SetDefaultModes() * add a channel to a user, creating the record for it if needed and linking * it to the user record */ -Channel* Channel::JoinUser(LocalUser* user, std::string cname, bool override, const std::string& key) +Membership* Channel::JoinUser(LocalUser* user, std::string cname, bool override, const std::string& key) { if (!user->IsFullyConnected()) { @@ -211,8 +211,7 @@ Channel* Channel::JoinUser(LocalUser* user, std::string cname, bool override, co // We figured that this join is allowed and also created the // channel if it didn't exist before, now do the actual join - chan->ForceJoin(user, &privs, false, created_by_local); - return chan; + return chan->ForceJoin(user, &privs, false, created_by_local); } Membership* Channel::ForceJoin(User* user, const std::string* privs, bool bursting, bool created_by_local) -- cgit v1.3.1-10-gc9f91