degesch: fix back-parsing outgoing CAP REQ

The bug has apparently been there since the beginning.
This commit is contained in:
Přemysl Eric Janouch 2021-05-28 02:54:07 +02:00
parent f9ba682c0e
commit 1ba59e6ee0
Signed by: p
GPG Key ID: A0420B94F92B9493
1 changed files with 3 additions and 3 deletions

View File

@ -6401,11 +6401,11 @@ irc_handle_mode_user (struct server *s, char **params)
static void
irc_handle_sent_cap (struct server *s, const struct irc_message *msg)
{
if (msg->params.len < 2)
if (msg->params.len < 1)
return;
const char *subcommand = msg->params.vector[1];
const char *args = (msg->params.len > 2) ? msg->params.vector[2] : "";
const char *subcommand = msg->params.vector[0];
const char *args = (msg->params.len > 1) ? msg->params.vector[1] : "";
if (!strcasecmp_ascii (subcommand, "REQ"))
log_server_status (s, s->buffer,
"#s: #S", "Capabilities requested", args);