summaryrefslogtreecommitdiff
path: root/degesch.c
diff options
context:
space:
mode:
authorPřemysl Eric Janouch <p@janouch.name>2021-05-28 02:54:07 +0200
committerPřemysl Eric Janouch <p@janouch.name>2021-05-28 04:04:44 +0200
commit1ba59e6ee0fba182f1fbb3daeb4b91c65e4b3e6a (patch)
tree91bcd8ded228e3baa4e3eea725f385b90c3a3eee /degesch.c
parentf9ba682c0eef7847e4372313908545f732fe81a4 (diff)
downloadxK-1ba59e6ee0fba182f1fbb3daeb4b91c65e4b3e6a.tar.gz
xK-1ba59e6ee0fba182f1fbb3daeb4b91c65e4b3e6a.tar.xz
xK-1ba59e6ee0fba182f1fbb3daeb4b91c65e4b3e6a.zip
degesch: fix back-parsing outgoing CAP REQ
The bug has apparently been there since the beginning.
Diffstat (limited to 'degesch.c')
-rw-r--r--degesch.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/degesch.c b/degesch.c
index 1d7b442..09ea823 100644
--- a/degesch.c
+++ b/degesch.c
@@ -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);