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-3.1.tar.gz
pounce-3.1.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 },
ua supportJune McEnroe Lua support is unused and the dlsym fwrite/write hacks horrify me. Clean it up. 2021-01-20Fix tests for diff spansJune McEnroe 2021-01-20Avoid matching ':' in make tagsJune McEnroe Otherwise a :: rule includes one of the ':'s in the tag name. 2021-01-19Prefer tag matches not preceded by [[:alnum:]]June McEnroe Otherwise the "id" in "void" matches for "void id". 2021-01-19Escape \ and / in mtags search patternsJune McEnroe 2021-01-20Use mtags in source-filterJune McEnroe 2021-01-19Add mtags to generate tags for make and mdocJune McEnroe 2021-01-19Map tags to IDs using only [[:alnum:]-._]June McEnroe 2021-01-19Don't use a pager if reading standard inputJune McEnroe 2021-01-19Support BSD make syntax and match *.amJune McEnroe These don't really go together, but... 2021-01-19Match tab following escaped newline in make assignmentsJune McEnroe Otherwise it ends up going into Shell state. 2021-01-18Allow matching lexers using first input lineJune McEnroe