[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] master cd3221a 2/2: Check rcirc-server for auto authentica
From: |
Noam Postavsky |
Subject: |
[Emacs-diffs] master cd3221a 2/2: Check rcirc-server for auto authentication (Bug#10162) |
Date: |
Wed, 5 Jun 2019 20:32:19 -0400 (EDT) |
branch: master
commit cd3221ab0f8dbde584a76c2648cc9029e63bd8d1
Author: Steve Scott <address@hidden>
Commit: Noam Postavsky <address@hidden>
Check rcirc-server for auto authentication (Bug#10162)
Since the hostname returned by irc.freenode.net can be something other
than irc.freenode.net, e.g. niven.freenode.net, 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
---
lisp/net/rcirc.el | 19 +++++++++----------
1 file changed, 9 insertions(+), 10 deletions(-)
diff --git a/lisp/net/rcirc.el b/lisp/net/rcirc.el
index 9c3828c..dae372f 100644
--- a/lisp/net/rcirc.el
+++ b/lisp/net/rcirc.el
@@ -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))
(rcirc-update-prompt)
- (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
(progn
(add-hook 'rcirc-authenticated-hook
'rcirc-join-channels-post-auth t t)
(rcirc-authenticate))