]> git.eshelyaron.com Git - emacs.git/commitdiff
Implement multi-prefix capability
authorPhilip Kaludercic <philipk@posteo.net>
Sun, 5 Sep 2021 18:42:48 +0000 (20:42 +0200)
committerPhilip Kaludercic <philipk@posteo.net>
Sun, 5 Sep 2021 18:46:14 +0000 (20:46 +0200)
* rcirc.el (rcirc-implemented-capabilities): Add capability
(rcirc-user-nick): Handle multiple prefixes

lisp/net/rcirc.el

index be90c56a43a98f0db34d0dad9b56a830c0d1435c..5a6688d5ff899ff3cf91e4aeef6a0c3fb68b0f56 100644 (file)
@@ -606,6 +606,7 @@ See `rcirc-connect' for more details on these variables.")
     "message-ids"                       ;https://ircv3.net/specs/extensions/message-ids
     "invite-notify"                     ;https://ircv3.net/specs/extensions/invite-notify
     "sasl"                              ;https://ircv3.net/specs/extensions/sasl-3.1
+    "multi-prefix"                      ;https://ircv3.net/specs/extensions/multi-prefix
     )
   "A list of capabilities that rcirc supports.")
 (defvar-local rcirc-requested-capabilities nil
@@ -2011,7 +2012,8 @@ PROCESS is the process object for the current connection."
   "Return the nick from USER.  Remove any non-nick junk."
   (save-match-data
     (if (string-match (concat "^[" rcirc-nick-prefix-chars
-                             "]?\\([^! ]+\\)!?") (or user ""))
+                             "]*\\([^! ]+\\)!?")
+                      (or user ""))
        (match-string 1 user)
       user)))