aboutsummaryrefslogtreecommitdiff
path: root/src/modules/m_watch.cpp
diff options
context:
space:
mode:
authorGravatar Sadie Powell2023-08-04 13:12:25 +0100
committerGravatar Sadie Powell2023-08-04 13:15:13 +0100
commitddc6273206ac04502060bc32c54982e3207e1693 (patch)
treea5e1ba8cf29636e1ac317f5b748731f59bab0688 /src/modules/m_watch.cpp
parentRework how away state is stored internally. (diff)
Send RPL_REAWAY for compatibility with Unreal's WATCH implementation.
Diffstat (limited to 'src/modules/m_watch.cpp')
-rw-r--r--src/modules/m_watch.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/modules/m_watch.cpp b/src/modules/m_watch.cpp
index fe2aaf0d1..7cb102683 100644
--- a/src/modules/m_watch.cpp
+++ b/src/modules/m_watch.cpp
@@ -28,6 +28,7 @@
enum
{
+ RPL_REAWAY = 597,
RPL_GONEAWAY = 598,
RPL_NOTAWAY = 599,
RPL_LOGON = 600,
@@ -249,7 +250,8 @@ public:
void OnUserAway(User* user, const std::optional<AwayState>& prevstate) override
{
- SendAlert(user, user->nick, RPL_GONEAWAY, user->away->message.c_str(), user->away->time);
+ unsigned int numeric = prevstate ? RPL_REAWAY : RPL_GONEAWAY;
+ SendAlert(user, user->nick, numeric, user->away->message.c_str(), user->away->time);
}
void OnUserBack(User* user, const std::optional<AwayState>& prevstate) override