>From 9468a786fb8c0ef950117e78395592f2e11613c2 Mon Sep 17 00:00:00 2001 From: Trevor Arjeski Date: Sun, 24 Nov 2024 23:35:41 +0300 Subject: [PATCH] erc: allow port as string in auth-source params Checking the equality of the given `erc-session-port' with "irc" is unnecessary since: 1. "irc" is already added to the list of ports 2. /etc/services may contain "ircs-u" (or other) as the desired port If the correct port/service is missing then the auth-source query will fail for a seemingly unknown reason. This also allows a user to `(setopt erc-port "1234")', intentionally or accidentally, and still be able to use .authinfo for password management. --- lisp/erc/erc.el | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/lisp/erc/erc.el b/lisp/erc/erc.el index 7028d0a68cc..81818a7227e 100644 --- a/lisp/erc/erc.el +++ b/lisp/erc/erc.el @@ -4675,8 +4675,7 @@ erc--auth-source-determine-params-defaults (list net erc-server-announced-name erc-session-server))) (ports (list (cl-typecase erc-session-port (integer (number-to-string erc-session-port)) - (string (and (string= erc-session-port "irc") - erc-session-port)) ; or nil + (string erc-session-port) ; or nil (t erc-session-port)) "irc"))) (list (cons :host (delq nil hosts)) -- 2.47.0