]> jfr.im git - irc/unrealircd/unrealircd.git/commitdiff
WATCH away notification: fix RPL_GONEAWAY and RPL_REAWAY not being sent
authorBram Matthys <redacted>
Sat, 15 Jul 2023 14:41:21 +0000 (16:41 +0200)
committerBram Matthys <redacted>
Sat, 15 Jul 2023 14:41:21 +0000 (16:41 +0200)
due to wrong event name being used. Noticed this bug in U6 (and
this bug does not exist in U5) after being pointed at watch away
notification again.

src/modules/watch.c

index e0cf39e986f23578a08deb1a545599deae675ec9..23c54edf0176eb7294451788e0053a73c0b94ea6 100644 (file)
@@ -404,7 +404,7 @@ int watch_notification(Client *client, Watch *watch, Link *lp, int event)
                            (IsUser(client) ? (IsHidden(client) ? client->user->virthost : client->user->realhost) : "<N/A>"),
                            (long long)client->user->away_since);
                } else
-               if (event == RPL_GONEAWAY)
+               if (event == WATCH_EVENT_AWAY)
                {
                        sendnumeric(lp->value.client, RPL_GONEAWAY,
                                    client->name,
@@ -413,7 +413,7 @@ int watch_notification(Client *client, Watch *watch, Link *lp, int event)
                                    (long long)client->user->away_since,
                                    client->user->away);
                } else
-               if (event == RPL_REAWAY)
+               if (event == WATCH_EVENT_REAWAY)
                {
                        sendnumeric(lp->value.client, RPL_REAWAY,
                                    client->name,