From 221ddf68cb70826c9cb889c44d7e97e9fc9ea856 Mon Sep 17 00:00:00 2001 From: Tassilo Horn Date: Thu, 31 Mar 2011 14:19:17 +0200 Subject: [PATCH] * net/rcirc.el (rcirc-handler-001): Only authenticate, if there's an entry for that server in rcirc-authinfo. (Bug#8385) --- lisp/ChangeLog | 5 +++++ lisp/net/rcirc.el | 10 +++++++++- 2 files changed, 14 insertions(+), 1 deletion(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 933eb2bd94e..8c42864ae30 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,8 @@ +2011-03-31 Tassilo Horn + + * net/rcirc.el (rcirc-handler-001): Only authenticate, if there's + an entry for that server in rcirc-authinfo. (Bug#8385) + 2011-03-31 Glenn Morris * progmodes/f90.el (f90-find-tag-default): Handle multiple `%'. diff --git a/lisp/net/rcirc.el b/lisp/net/rcirc.el index eb4ad01ecd7..5822fc3cf32 100644 --- a/lisp/net/rcirc.el +++ b/lisp/net/rcirc.el @@ -2454,7 +2454,15 @@ keywords when no KEYWORD is given." (setq rcirc-nick (car args)) (rcirc-update-prompt) (if rcirc-auto-authenticate-flag - (if rcirc-authenticate-before-join + (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))))) (progn (add-hook 'rcirc-authenticated-hook 'rcirc-join-channels-post-auth t t) (rcirc-authenticate)) -- 2.39.2