about summary refs log tree commit diff
diff options
context:
space:
mode:
authorJune McEnroe <june@causal.agency>2023-02-07 12:17:19 -0500
committerJune McEnroe <june@causal.agency>2023-02-07 12:17:19 -0500
commit2abf0df3017195842c12197de3ea092febf2e60c (patch)
tree56987588d490af1dcdd64b8306e59c244af4a34d
parentRemove pounce-edit (diff)
downloadpounce-2abf0df3017195842c12197de3ea092febf2e60c.tar.gz
pounce-2abf0df3017195842c12197de3ea092febf2e60c.zip
Handle irssi's invalid JOIN during registration 3.1
Thanks to Tassilo Philipp for reporting this behaviour.
-rw-r--r--client.c10
1 files changed, 10 insertions, 0 deletions
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 },