From 14fee1c4b5f7593c5bd794dc7df5265de12f1294 Mon Sep 17 00:00:00 2001 From: Luke Bratch Date: Sun, 19 May 2019 22:22:11 +0100 Subject: Include 313 (RPL_WHOISOPERATOR) and 320 (RPL_WHOISSPECIAL) in pending-clients-only WHOIS responses. --- blabouncer.c | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/blabouncer.c b/blabouncer.c index 6d473c9..571ff79 100644 --- a/blabouncer.c +++ b/blabouncer.c @@ -1064,13 +1064,16 @@ int processircmessage(SSL *server_ssl, char *str, int source, struct client *cli return 1; } - // Server 307 (RPL_SUSERHOST), 311 (RPL_WHOISUSER), 312 (RPL_WHOISSERVER), 317 (RPL_WHOISIDLE), 319 (RPL_WHOISCHANNELS), or 318 (RPL_ENDOFWHOIS) received? + // Server 307 (RPL_SUSERHOST), 311 (RPL_WHOISUSER), 312 (RPL_WHOISSERVER), 313 (RPL_WHOISOPERATOR), 317 (RPL_WHOISIDLE), + // 319 (RPL_WHOISCHANNELS), 320 (RPL_WHOISSPECIAL), or 318 (RPL_ENDOFWHOIS) received? // Send to any clients who requested a WHOIS. if (strncmp(tokens[1], "307", strlen(tokens[1])) == 0 || strncmp(tokens[1], "311", strlen(tokens[1])) == 0 || - strncmp(tokens[1], "312", strlen(tokens[1])) == 0 || strncmp(tokens[1], "317", strlen(tokens[1])) == 0 || - strncmp(tokens[1], "319", strlen(tokens[1])) == 0 || strncmp(tokens[1], "318", strlen(tokens[1])) == 0) { - printf("Server 307 RPL_SUSERHOST, 311 RPL_WHOISUSER, 312 RPL_WHOISSERVER, 317 RPL_WHOISIDLE, 319 RPL_WHOISCHANNELS, or 318 RPL_ENDOFWHOIS " - "found and it is: %s with length %zd! Sending to clients who are pending one of these.\n", tokens[1], strlen(tokens[1])); + strncmp(tokens[1], "312", strlen(tokens[1])) == 0 || strncmp(tokens[1], "313", strlen(tokens[1])) == 0 || + strncmp(tokens[1], "317", strlen(tokens[1])) == 0 || strncmp(tokens[1], "319", strlen(tokens[1])) == 0 || + strncmp(tokens[1], "320", strlen(tokens[1])) == 0 || strncmp(tokens[1], "318", strlen(tokens[1])) == 0) { + printf("Server 307 RPL_SUSERHOST, 311 RPL_WHOISUSER, 312 RPL_WHOISSERVER, 313 (RPL_WHOISOPERATOR), 317 RPL_WHOISIDLE, " + "319 RPL_WHOISCHANNELS, 320 (RPL_WHOISSPECIAL), or 318 RPL_ENDOFWHOIS found and it is: %s with length %zd! " + "Sending to clients who are pending one of these.\n", tokens[1], strlen(tokens[1])); // Relay to all pending clients for (int i = 0; i < MAXCLIENTS; i++) { -- cgit v1.2.3