diff options
author | Luke Bratch <luke@bratch.co.uk> | 2019-05-19 22:22:11 +0100 |
---|---|---|
committer | Luke Bratch <luke@bratch.co.uk> | 2019-05-19 22:22:11 +0100 |
commit | 14fee1c4b5f7593c5bd794dc7df5265de12f1294 (patch) | |
tree | 56f90a65c52a52cb29b9edb51e2109b61e6c17eb | |
parent | 62e67b22e721d2e08c4a4d5dbc85e404fd2ba507 (diff) |
Include 313 (RPL_WHOISOPERATOR) and 320 (RPL_WHOISSPECIAL) in pending-clients-only WHOIS responses.
-rw-r--r-- | blabouncer.c | 13 |
1 files 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++) { |