bug#81642: [PATCH] rcirc: Allow UnrealIRCd CAP whitespace quirk
Eli Zaretskii <[email protected]>
| Newsgroups | gmane.emacs.bugs |
|---|---|
| Message-ID | <[email protected]> |
> From: Jaidyn Ann <[email protected]> > Date: Mon, 17 Aug 2026 02:42:20 +0000 > > Tags: patch > > Hi there, > > I've got a minor minor bugfix. > > Trying to connect to Slashnet recently, I found rcirc couldn't > get out of registration because of a weird quirk with their > server's CAP messages: Names sometimes have trailing whitespace, > so rcirc doesn't catch that it's been properly ACKd by the server. > > Where `cap` parsed out of the server's mesage is > "multi-prefix " and rcirc-requested-capabilities only contains > "multi-prefix", this won't work: > `(delete cap rcirc-requested-capabilities)` > > String-trimming `cap` there fixes it. Thanks, let me add the relevant individuals to this discussion. > In GNU Emacs 30.2 (build 1, aarch64-unknown-linux-gnu, GTK+ Version > 3.24.51, cairo version 1.18.4) of 2025-12-01, modified by Debian built > on sbuild > Windowing system distributor 'The X.Org Foundation', version 11.0.12101021 > System Description: Debian GNU/Linux forky/sid > > Configured using: > 'configure --build aarch64-linux-gnu --prefix=/usr > --sharedstatedir=/var/lib --libexecdir=/usr/libexec > --localstatedir=/var/lib --infodir=/usr/share/info > --mandir=/usr/share/man --with-libsystemd --with-pop=yes > --enable-locallisppath=/etc/emacs:/usr/local/share/emacs/30.2/site-lisp:/usr/local/share/emacs/site-lisp:/usr/share/emacs/30.2/site-lisp:/usr/share/emacs/site-lisp > --with-sound=alsa --without-gconf --with-mailutils --build > aarch64-linux-gnu --prefix=/usr --sharedstatedir=/var/lib > --libexecdir=/usr/libexec --localstatedir=/var/lib > --infodir=/usr/share/info --mandir=/usr/share/man --with-libsystemd > --with-pop=yes > --enable-locallisppath=/etc/emacs:/usr/local/share/emacs/30.2/site-lisp:/usr/local/share/emacs/site-lisp:/usr/share/emacs/30.2/site-lisp:/usr/share/emacs/site-lisp > --with-sound=alsa --without-gconf --with-mailutils --with-cairo > --with-x=yes --with-x-toolkit=gtk3 --with-toolkit-scroll-bars > 'CFLAGS=-g -O2 -Werror=implicit-function-declaration > -ffile-prefix-map=/build/reproducible-path/emacs-30.2+1=. -fstack-protector-strong > -fstack-clash-protection -Wformat -Werror=format-security > -mbranch-protection=standard -Wall' 'CPPFLAGS=-Wdate-time > -D_FORTIFY_SOURCE=2' LDFLAGS=-Wl,-z,relro' > > >From cd424bb53a87c40f6570ecd4d5cd83eedce5448f Mon Sep 17 00:00:00 2001 > From: Jaidyn Ann <[email protected]> > Date: Sun, 16 Aug 2026 21:32:03 -0500 > Subject: [PATCH] rcirc: Allow UnrealIRCd CAP whitespace quirk > > (rcirc-handler-CAP): Trim received capability > names, since some servers *cough* add trailing whitespace. > --- > lisp/net/rcirc.el | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/lisp/net/rcirc.el b/lisp/net/rcirc.el > index a7cf5c0db37..cd1638c2d1f 100644 > --- a/lisp/net/rcirc.el > +++ b/lisp/net/rcirc.el > @@ -3820,7 +3820,7 @@ ARGS should have the form (USER SUBCOMMAND . ARGUMENTS). PROCESS > is the process object for the current connection." > (with-rcirc-process-buffer process > (let ((subcmd (cadr args))) > - (dolist (cap (cddr args)) > + (dolist (cap (mapcar 'string-trim (cddr args))) > (cond ((string= subcmd "ACK") > (push (intern (downcase cap)) rcirc-acked-capabilities) > (setq rcirc-requested-capabilities > -- > 2.53.0 >