Merge 64f91df8fb4a5be8ba4d7f4db13b66a59ce35db6 into 444945511339668c3339357c832d8f00fc9bac27

This commit is contained in:
Moritz Wilhelmy 2025-04-15 11:43:16 +02:00 committed by GitHub
commit 274dbd33ce
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 10 additions and 2 deletions

View File

@ -706,6 +706,14 @@ void servers_redirect_init(void)
NULL, /* */
NULL);
/* NAMES */
server_redirect_register("names", TRUE, 0,
"event 353", -1, /* An element of NAMES */
NULL,
"event 366", 1, /* End of NAMES */
NULL,
NULL);
/* LIST */
server_redirect_register("list", FALSE, 0,
"event 321", 1, /* Begins the LIST */

View File

@ -304,14 +304,14 @@ static void handle_client_cmd(CLIENT_REC *client, char *cmd, char *args,
grab_who(client, args);
else if (g_strcmp0(cmd, "WHOWAS") == 0)
proxy_redirect_event(client, "whowas", 1, args, -1);
else if (g_strcmp0(cmd, "WHOIS") == 0) {
else if (g_strcmp0(cmd, "WHOIS") == 0 || g_strcmp0(cmd, "NAMES") == 0) {
char *p;
/* convert dots to spaces */
for (p = args; *p != '\0'; p++)
if (*p == ',') *p = ' ';
proxy_redirect_event(client, "whois", 1, args, TRUE);
proxy_redirect_event(client, *cmd == 'N' ? "names" : "whois", 1, args, TRUE);
} else if (g_strcmp0(cmd, "ISON") == 0)
proxy_redirect_event(client, "ison", 1, args, -1);
else if (g_strcmp0(cmd, "USERHOST") == 0)