diff options
| author | 2023-08-04 13:59:15 +0100 | |
|---|---|---|
| committer | 2023-08-04 13:59:15 +0100 | |
| commit | d0f9d84ead13c0ff217a71aefd3ebcd8cbb09084 (patch) | |
| tree | a71425c2834e5fcaab825a49ce42f180652eaff2 /src/modules/m_ircv3.cpp | |
| parent | Send RPL_REAWAY for compatibility with Unreal's WATCH implementation. (diff) | |
Pass the raw away state to AwayMessage in the ircv3 module.
Diffstat (limited to 'src/modules/m_ircv3.cpp')
| -rw-r--r-- | src/modules/m_ircv3.cpp | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/modules/m_ircv3.cpp b/src/modules/m_ircv3.cpp index 4ff94ea6d..94c0ca922 100644 --- a/src/modules/m_ircv3.cpp +++ b/src/modules/m_ircv3.cpp @@ -34,7 +34,7 @@ public: AwayMessage(User* user) : ClientProtocol::Message("AWAY", user) { - SetParams(user, user->away->message); + SetParams(user, user->away); } AwayMessage() @@ -42,12 +42,12 @@ public: { } - void SetParams(User* user, const std::string& awaymsg) + void SetParams(User* user, const std::optional<AwayState>& awaystate) { // Going away: 1 parameter which is the away reason // Back from away: no parameter - if (!awaymsg.empty()) - PushParam(awaymsg); + if (awaystate) + PushParam(awaystate->message); } }; @@ -101,7 +101,7 @@ public: if ((memb->user->IsAway()) && (awaycap.IsActive())) { awaymsg.SetSource(join); - awaymsg.SetParams(memb->user, memb->user->away->message); + awaymsg.SetParams(memb->user, memb->user->away); } } |
