Commit cd3221ab authored by Steve Scott's avatar Steve Scott Committed by Noam Postavsky

Check rcirc-server for auto authentication (Bug#10162)

Since the hostname returned by can be something other
than, e.g., the entries for
rcirc-authinfo and rcirc-server-alist will not match.
* lisp/net/rcirc.el (rcirc-handler-001): Check rcirc-server (the
hostname connected to) instead of rcirc-server-name (the hostname
returned), this corresponds with what rcirc-authenticate does.
Moreover, if rcirc-auto-authenticate-flag is set, check the
corresponding rcirc-authinfo, regardless of whether the
rcirc-authenticate-before-join must happen.

Copyright-paperwork-exempt: yes
parent da118e6a
Pipeline #1908 failed with stage
in 11 seconds
......@@ -2545,16 +2545,15 @@ If ARG is given, opens the URL in a new browser window."
(setq rcirc-server-name sender)
(setq rcirc-nick (car args))
(if rcirc-auto-authenticate-flag
(if (and rcirc-authenticate-before-join
;; We have to ensure that there's an authentication
;; entry for that server. Else,
;; rcirc-authenticated-hook won't be triggered, and
;; autojoin won't happen at all.
(let (auth-required)
(dolist (s rcirc-authinfo auth-required)
(when (string-match (car s) rcirc-server-name)
(setq auth-required t)))))
(if (and rcirc-auto-authenticate-flag
;; We have to ensure that there's an authentication
;; entry for that server. Otherwise,
;; there's no point in calling authenticate.
(let (auth-required)
(dolist (s rcirc-authinfo auth-required)
(when (string-match (car s) rcirc-server)
(setq auth-required t)))))
(if rcirc-authenticate-before-join
(add-hook 'rcirc-authenticated-hook 'rcirc-join-channels-post-auth t t)
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment