]> git.eshelyaron.com Git - emacs.git/commitdiff
rcirc: Match NickServ messages case-insensitively (Bug#39345)
authorNoam Postavsky <npostavs@gmail.com>
Fri, 13 Mar 2020 01:03:45 +0000 (21:03 -0400)
committerNoam Postavsky <npostavs@gmail.com>
Fri, 13 Mar 2020 01:06:28 +0000 (21:06 -0400)
Reported by Jake Nelson <jake.nelson@gmail.com>.
* lisp/net/rcirc.el (rcirc-check-auth-status): NickServ will response
will show the nick in the same case used during registration, but
it allows case-insensitive matches when logging in.  Therefore, we
should accept response messages regardless of case.

lisp/net/rcirc.el

index a223416690327a8f09aa51b0f05318e914c69f0d..1766e192f2df052ba20228fa5982deb22c9a3397 100644 (file)
@@ -2626,12 +2626,16 @@ the only argument."
                (and ;; nickserv
                 (string= sender "NickServ")
                 (string= target rcirc-nick)
-                (member message
-                        (list
-                         (format "You are now identified for \C-b%s\C-b." rcirc-nick)
-                        (format "You are successfully identified as \C-b%s\C-b." rcirc-nick)
-                         "Password accepted - you are now recognized."
-                         )))
+                (cl-member
+                 message
+                 (list
+                  (format "You are now identified for \C-b%s\C-b." rcirc-nick)
+                  (format "You are successfully identified as \C-b%s\C-b."
+                          rcirc-nick)
+                  "Password accepted - you are now recognized.")
+                 ;; The nick may have a different case, so match
+                 ;; case-insensitively (Bug#39345).
+                 :test #'cl-equalp))
                (and ;; quakenet
                 (string= sender "Q")
                 (string= target rcirc-nick)