[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
feature/rcirc-update 354929a 6/7: Implement standard-replies capability
From: |
Philip Kaludercic |
Subject: |
feature/rcirc-update 354929a 6/7: Implement standard-replies capability |
Date: |
Mon, 6 Sep 2021 17:30:18 -0400 (EDT) |
branch: feature/rcirc-update
commit 354929a85a292137256b3abbca6c2983dd93dee3
Author: Philip Kaludercic <philipk@posteo.net>
Commit: Philip Kaludercic <philipk@posteo.net>
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
---
lisp/net/rcirc.el | 25 +++++++++++++++++++++++++
1 file changed, 25 insertions(+)
diff --git a/lisp/net/rcirc.el b/lisp/net/rcirc.el
index a819fb8..0315d71 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."
- feature/rcirc-update updated (608b2ec -> 8275f0b), Philip Kaludercic, 2021/09/06
- feature/rcirc-update 008a033 1/7: Print value on malformed input, Philip Kaludercic, 2021/09/06
- feature/rcirc-update 8275f0b 7/7: Mention list of capabilities that should be implemented, Philip Kaludercic, 2021/09/06
- feature/rcirc-update 659a77a 5/7: Connect to server asynchronously, Philip Kaludercic, 2021/09/06
- feature/rcirc-update 0f1db3d 2/7: Store symbols in rcirc-acked-capabilities, Philip Kaludercic, 2021/09/06
- feature/rcirc-update e37f3ce 3/7: Fix rcirc-track-abbrevate-flag documentation, Philip Kaludercic, 2021/09/06
- feature/rcirc-update 354929a 6/7: Implement standard-replies capability,
Philip Kaludercic <=
- feature/rcirc-update 70d4599 4/7: Implement multi-prefix capability, Philip Kaludercic, 2021/09/06