summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlex McGrath <amk@amk.ie>2021-06-29 12:06:22 +0100
committerTassilo Horn <tsdh@gnu.org>2021-06-29 13:41:28 +0200
commita85d27278eaf0214cdb2f6c4f3b764f2392f068b (patch)
treefd30f45f1be8612bf72e4b6eabe15c751a10e928
parentdf6efb1c8b0b1c64d183f966da00401593b5e96b (diff)
downloademacs-a85d27278eaf0214cdb2f6c4f3b764f2392f068b.tar.gz
emacs-a85d27278eaf0214cdb2f6c4f3b764f2392f068b.tar.bz2
emacs-a85d27278eaf0214cdb2f6c4f3b764f2392f068b.zip
Send CAP END after authentication has been successful
-rw-r--r--lisp/net/rcirc.el15
1 files changed, 10 insertions, 5 deletions
diff --git a/lisp/net/rcirc.el b/lisp/net/rcirc.el
index 0feafd708ab..d1b87abb62b 100644
--- a/lisp/net/rcirc.el
+++ b/lisp/net/rcirc.el
@@ -657,8 +657,6 @@ that are joined after authentication."
(or server-alias server) nil server port-number
:type (or encryption 'plain))))
;; set up process
- (when use-sasl
- (setq-local rcirc-finished-sasl nil))
(set-process-coding-system process 'raw-text 'raw-text)
(switch-to-buffer (rcirc-generate-new-buffer-name process nil))
(set-process-buffer process (current-buffer))
@@ -682,6 +680,8 @@ that are joined after authentication."
(add-hook 'auto-save-hook 'rcirc-log-write)
+ (when use-sasl
+ (setq-local rcirc-finished-sasl nil))
;; identify
(dolist (cap rcirc-implemented-capabilities)
(rcirc-send-string process "CAP" "REQ" : cap)
@@ -3509,9 +3509,14 @@ PROCESS is the process object for the current connection."
(base64-encode-string
;; use connection user-name
(concat "\0" (nth 3 rcirc-connection-info)
- "\0" (rcirc-get-server-password rcirc-server))))
- (setq-local rcirc-finished-sasl t)
- (rcirc-send-string process "CAP" "END"))
+ "\0" (rcirc-get-server-password rcirc-server)))))
+
+(defun rcirc-handler-900 (process sender args _text)
+ "Respond to a successful authentication response"
+ (rcirc-handler-generic process "900" sender args nil)
+ (when (not rcirc-finished-sasl)
+ (setq-local rcirc-finished-sasl t)
+ (rcirc-send-string process "CAP" "END")))
(defgroup rcirc-faces nil