From 2abf0df3017195842c12197de3ea092febf2e60c Mon Sep 17 00:00:00 2001 From: June McEnroe Date: Tue, 7 Feb 2023 12:17:19 -0500 Subject: Handle irssi's invalid JOIN during registration Thanks to Tassilo Philipp for reporting this behaviour. --- client.c | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/client.c b/client.c index 1ae31ed..3827b87 100644 --- a/client.c +++ b/client.c @@ -279,6 +279,15 @@ static void handleAuthenticate(struct Client *client, struct Message *msg) { } } +static void handleJoin(struct Client *client, struct Message *msg) { + (void)client; + (void)msg; + // irssi intentionally sends an invalid JOIN command, at + // an invalid time (during client registration), on every + // connection. Utterly mind-boggling. Ignore it so the + // connection doesn't just get dropped like it deserves to be. +} + static void handleQuit(struct Client *client, struct Message *msg) { const char *mesg = msg->params[0]; if (mesg && !strncmp(mesg, "$pounce", 7) && (!mesg[7] || mesg[7] == ' ')) { @@ -383,6 +392,7 @@ static const struct { Handler *fn; } Handlers[] = { { false, false, "AUTHENTICATE", handleAuthenticate }, + { false, false, "JOIN", handleJoin }, { false, false, "NICK", handleNick }, { false, false, "PASS", handlePass }, { false, false, "USER", handleUser }, -- cgit 1.4.1