From 32c99047f4972c3a06f9c320f0fde0b33799e189 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Helleu?= Date: Sat, 16 Oct 2021 18:35:45 +0200 Subject: [PATCH] irc: use parsed command parameters in "437" command callback --- src/plugins/irc/irc-protocol.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/plugins/irc/irc-protocol.c b/src/plugins/irc/irc-protocol.c index e0704adfb..8bff30513 100644 --- a/src/plugins/irc/irc-protocol.c +++ b/src/plugins/irc/irc-protocol.c @@ -6240,7 +6240,7 @@ IRC_PROTOCOL_CALLBACK(433) * Callback for the IRC command "437": nick/channel temporarily unavailable. * * Command looks like: - * :server 437 * mynick :Nick/channel is temporarily unavailable + * 437 * mynick :Nick/channel is temporarily unavailable */ IRC_PROTOCOL_CALLBACK(437) @@ -6255,8 +6255,8 @@ IRC_PROTOCOL_CALLBACK(437) if (!server->is_connected) { - if ((argc >= 4) - && (irc_server_strcasecmp (server, server->nick, argv[3]) == 0)) + if ((num_params >= 2) + && (irc_server_strcasecmp (server, server->nick, params[1]) == 0)) { ptr_buffer = irc_msgbuffer_get_target_buffer (server, NULL, command, NULL, NULL);