From ddc6273206ac04502060bc32c54982e3207e1693 Mon Sep 17 00:00:00 2001 From: Sadie Powell Date: Fri, 4 Aug 2023 13:12:25 +0100 Subject: Send RPL_REAWAY for compatibility with Unreal's WATCH implementation. --- src/modules/m_watch.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'src/modules/m_watch.cpp') 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& 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& prevstate) override -- cgit v1.3.1-10-gc9f91