summaryrefslogtreecommitdiff
path: root/message.c
diff options
context:
space:
mode:
Diffstat (limited to 'message.c')
-rw-r--r--message.c18
1 files changed, 14 insertions, 4 deletions
diff --git a/message.c b/message.c
index 0373ef3..b815bec 100644
--- a/message.c
+++ b/message.c
@@ -526,16 +526,19 @@ int processservermessage(SSL *server_ssl, char *str, struct client *clients, int
}
// Server 307 (RPL_SUSERHOST), 311 (RPL_WHOISUSER), 312 (RPL_WHOISSERVER), 313 (RPL_WHOISOPERATOR), 317 (RPL_WHOISIDLE),
- // 319 (RPL_WHOISCHANNELS), 320 (RPL_WHOISSPECIAL), 671 (RPL_WHOISSECURE), or 318 (RPL_ENDOFWHOIS) received?
+ // 319 (RPL_WHOISCHANNELS), 320 (RPL_WHOISSPECIAL), 378 (RPL_WHOISHOST), 379 (RPL_WHOISMODES), 671 (RPL_WHOISSECURE),
+ // 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], "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], "671", strlen(tokens[1])) == 0 ||
+ strncmp(tokens[1], "320", strlen(tokens[1])) == 0 || strncmp(tokens[1], "378", strlen(tokens[1])) == 0 ||
+ strncmp(tokens[1], "379", strlen(tokens[1])) == 0 || strncmp(tokens[1], "671", strlen(tokens[1])) == 0 ||
strncmp(tokens[1], "318", strlen(tokens[1])) == 0) {
debugprint(DEBUG_FULL, "Server 307 RPL_SUSERHOST, 311 RPL_WHOISUSER, 312 RPL_WHOISSERVER, 313 (RPL_WHOISOPERATOR), 317 RPL_WHOISIDLE, "
- "319 RPL_WHOISCHANNELS, 320 (RPL_WHOISSPECIAL), 671 (RPL_WHOISSECURE), 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]));
+ "319 RPL_WHOISCHANNELS, 320 (RPL_WHOISSPECIAL), 378 RPL_WHOISHOST, 379 (RPL_WHOISMODES), 671 (RPL_WHOISSECURE), "
+ "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++) {
@@ -1158,6 +1161,13 @@ int processclientmessage(SSL *server_ssl, char *str, struct client *clients, int
}
}
+ // Client OPER received, send straight on to server
+ if (strncasecmp(tokens[0], "OPER", strlen(tokens[0])) == 0) {
+ debugprint(DEBUG_FULL, "Client OPER found and it is: %s with length %zd! Sending to server..\n", tokens[0], strlen(tokens[0]));
+ sendtoserver(server_ssl, str, strlen(str), sourcefd, clients, settings);
+ return 1;
+ }
+
// Custom BLABOUNCER command received
// Case insensitive comparisons here since clients won't be recognising and uppercasing these commands
if (strncasecmp(tokens[0], "BLABOUNCER", strlen(tokens[0])) == 0) {