commit ef7863e
Michael Forney
·
2026-03-19 10:05:37 +0000 UTC
parent 2e7560d
catgirl: Fix compatibility with soju
2 files changed,
+43,
-1
1@@ -0,0 +1,42 @@
2+From 0379f92f9ccd424a741cf38fb7dee7bdf0333588 Mon Sep 17 00:00:00 2001
3+From: Michael Forney <mforney@mforney.org>
4+Date: Thu, 19 Mar 2026 02:48:24 -0700
5+Subject: [PATCH] Send CAP END on RPL_SASLSUCCESS
6+
7+soju does not send 900 RPL_LOGGEDIN after SASL authentication[0]
8+in order to show the one from the upstream network.
9+
10+We already sent CAP END *unless* doing SASL, so it makes sense to
11+look for 903 RPL_SASLSUCCESS to send CAP END when we *are* doing
12+SASL.
13+
14+[0] https://github.com/ircv3/ircv3-specifications/pull/476
15+---
16+ handle.c | 4 ++--
17+ 1 file changed, 2 insertions(+), 2 deletions(-)
18+
19+diff --git a/handle.c b/handle.c
20+index a4f1015..e3d6884 100644
21+--- a/handle.c
22++++ b/handle.c
23+@@ -229,7 +229,7 @@ static void handleAuthenticate(struct Message *msg) {
24+ explicit_bzero(self.plainPass, strlen(self.plainPass));
25+ }
26+
27+-static void handleReplyLoggedIn(struct Message *msg) {
28++static void handleReplySASLSuccess(struct Message *msg) {
29+ (void)msg;
30+ ircFormat("CAP END\r\n");
31+ }
32+@@ -1367,7 +1367,7 @@ static const struct Handler {
33+ { "704", +ReplyHelp, handleReplyHelp },
34+ { "705", +ReplyHelp, handleReplyHelp },
35+ { "706", -ReplyHelp, NULL },
36+- { "900", 0, handleReplyLoggedIn },
37++ { "903", 0, handleReplySASLSuccess },
38+ { "904", 0, handleErrorSASLFail },
39+ { "905", 0, handleErrorSASLFail },
40+ { "906", 0, handleErrorSASLFail },
41+--
42+2.49.0
43+
+1,
-1
1@@ -1 +1 @@
2-2.1 r0
3+2.1 r1