summaryrefslogtreecommitdiff
path: root/lisp/net
diff options
context:
space:
mode:
authorPhilip Kaludercic <philipk@posteo.net>2021-09-06 22:37:33 +0200
committerPhilip Kaludercic <philipk@posteo.net>2021-09-06 23:19:52 +0200
commit354929a85a292137256b3abbca6c2983dd93dee3 (patch)
treed4dbd6e641687b9a03a5061ad312999461f5ef28 /lisp/net
parent659a77a0eb2b024cdd7f2143a95a178a2174852f (diff)
downloademacs-354929a85a292137256b3abbca6c2983dd93dee3.tar.gz
Implement standard-replies capability
* rcirc.el (rcirc-implemented-capabilities): Add standard-replies to list (rcirc-response-formats): Add response formats for WARN, FAIL and NOTE (rcirc-handler-FAIL): Add handler (rcirc-handler-WARN): Add handler (rcirc-handler-NOTE): Add handler
Diffstat (limited to 'lisp/net')
-rw-r--r--lisp/net/rcirc.el25
1 files changed, 25 insertions, 0 deletions
diff --git a/lisp/net/rcirc.el b/lisp/net/rcirc.el
index a819fb87c08..0315d715036 100644
--- a/lisp/net/rcirc.el
+++ b/lisp/net/rcirc.el
@@ -607,6 +607,7 @@ See `rcirc-connect' for more details on these variables.")
"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
+ "standard-replies" ;https://ircv3.net/specs/extensions/standard-replies
)
"A list of capabilities that rcirc supports.")
(defvar-local rcirc-requested-capabilities nil
@@ -1639,6 +1640,9 @@ extracted."
("ACTION" . "[%N %m]")
("COMMAND" . "%m")
("ERROR" . "%fw!!! %m")
+ ("FAIL" . "(%fwFAIL%f-) %m")
+ ("WARN" . "(%fwWARN%f-) %m")
+ ("NOTE" . "(%fwNOTE%f-) %m")
(t . "%fp*** %fs%n %r %m"))
"An alist of formats used for printing responses.
The format is looked up using the response-type as a key;
@@ -3565,6 +3569,27 @@ process object for the current connection."
(rcirc-send-string process "CAP" "END"))
(rcirc-join-channels-post-auth process))
+(defun rcirc-handler-FAIL (process _sender args _text)
+ "Display a FAIL message, as indicated by ARGS.
+PROCESS is the process object for the current connection."
+ (rcirc-print process nil "FAIL" nil
+ (mapconcat #'identity args " ")
+ t))
+
+(defun rcirc-handler-WARN (process _sender args _text)
+ "Display a WARN message, as indicated by ARGS.
+PROCESS is the process object for the current connection."
+ (rcirc-print process nil "WARN" nil
+ (mapconcat #'identity args " ")
+ t))
+
+(defun rcirc-handler-NOTE (process _sender args _text)
+ "Display a NOTE message, as indicated by ARGS.
+PROCESS is the process object for the current connection."
+ (rcirc-print process nil "NOTE" nil
+ (mapconcat #'identity args " ")
+ t))
+
(defgroup rcirc-faces nil
"Faces for rcirc."