diff options
| author | 2023-06-22 16:40:05 +0100 | |
|---|---|---|
| committer | 2023-06-22 16:40:05 +0100 | |
| commit | 80894752a760dbfb2fb44dfc8c7f8e317adba1c1 (patch) | |
| tree | a30c85769f9733e1875d4a8d01478b3c5304b898 /src/modules | |
| parent | Replace <cloak:sanitize> with <cloak:invalidchar>. (diff) | |
Make JoinUser return a Membership instead of a Channel.
Diffstat (limited to 'src/modules')
| -rw-r--r-- | src/modules/m_ojoin.cpp | 10 | ||||
| -rw-r--r-- | src/modules/m_sajoin.cpp | 4 |
2 files changed, 7 insertions, 7 deletions
diff --git a/src/modules/m_ojoin.cpp b/src/modules/m_ojoin.cpp index f12dd8b5e..6538ed981 100644 --- a/src/modules/m_ojoin.cpp +++ b/src/modules/m_ojoin.cpp @@ -54,19 +54,19 @@ public: active = true; // override is false because we want OnUserPreJoin to run - Channel* channel = Channel::JoinUser(user, parameters[0], false); + Membership* memb = Channel::JoinUser(user, parameters[0], false); active = false; - if (channel) + if (memb) { - ServerInstance->SNO.WriteGlobalSno('a', user->nick+" used OJOIN to join "+channel->name); + ServerInstance->SNO.WriteGlobalSno('a', user->nick+" used OJOIN to join "+memb->chan->name); if (notice) - channel->WriteRemoteNotice(user->nick + " joined on official network business."); + memb->chan->WriteRemoteNotice(user->nick + " joined on official network business."); } else { - channel = ServerInstance->Channels.Find(parameters[0]); + Channel* channel = ServerInstance->Channels.Find(parameters[0]); if (!channel) return CmdResult::FAILURE; diff --git a/src/modules/m_sajoin.cpp b/src/modules/m_sajoin.cpp index 100cf7186..def956b41 100644 --- a/src/modules/m_sajoin.cpp +++ b/src/modules/m_sajoin.cpp @@ -87,8 +87,8 @@ public: LocalUser* localuser = IS_LOCAL(dest); if (localuser) { - chan = Channel::JoinUser(localuser, channel, true); - if (chan) + Membership* memb = Channel::JoinUser(localuser, channel, true); + if (memb) { ServerInstance->SNO.WriteGlobalSno('a', user->nick+" used SAJOIN to make "+dest->nick+" join "+channel); return CmdResult::SUCCESS; |
