[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
master ae254a65cd 5/8: Call erc-login indirectly via new generic wrapper
From: |
Amin Bandali |
Subject: |
master ae254a65cd 5/8: Call erc-login indirectly via new generic wrapper |
Date: |
Wed, 23 Nov 2022 21:24:36 -0500 (EST) |
branch: master
commit ae254a65cd6c0292865c449d639140f5d149f68e
Author: F. Jason Park <jp@neverwas.me>
Commit: Amin Bandali <bandali@gnu.org>
Call erc-login indirectly via new generic wrapper
* lisp/erc/erc-backend (erc--register-connection): Add new internal
generic function that defers to `erc-login' by default.
(erc-process-sentinel, erc-server-connect): Call
`erc--register-connection' instead of `erc-login'.
---
lisp/erc/erc-backend.el | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/lisp/erc/erc-backend.el b/lisp/erc/erc-backend.el
index 30b53dfd8e..973616bc37 100644
--- a/lisp/erc/erc-backend.el
+++ b/lisp/erc/erc-backend.el
@@ -643,6 +643,10 @@ The current buffer is given by BUFFER."
(let ((p (plist-put parameters :nowait t)))
(apply #'open-network-stream name buffer host service p)))
+(cl-defmethod erc--register-connection ()
+ "Perform opening IRC protocol exchange with server."
+ (erc-login))
+
(defvar erc--server-connect-dumb-ipv6-regexp
;; Not for validation (gives false positives).
(rx bot "[" (group (+ (any xdigit digit ":.")) (? "%" (+ alnum))) "]" eot))
@@ -697,7 +701,7 @@ TLS (see `erc-session-client-certificate' for more
details)."
;; waiting for a non-blocking connect - keep the user informed
(erc-display-message nil nil buffer "Opening connection..\n")
(message "%s...done" msg)
- (erc-login)) ))
+ (erc--register-connection))))
(defun erc-server-reconnect ()
"Reestablish the current IRC connection.
@@ -897,7 +901,7 @@ Conditionally try to reconnect and take appropriate action."
cproc (process-status cproc) event erc-server-quitting))
(if (string-match "^open" event)
;; newly opened connection (no wait)
- (erc-login)
+ (erc--register-connection)
;; assume event is 'failed
(erc-with-all-buffers-of-server cproc nil
(setq erc-server-connected nil))
- master updated (d47e05219f -> f8b410f4a1), Amin Bandali, 2022/11/23
- master dc6ff142bc 3/8: Make erc--server-reconnecting non-buffer-local, Amin Bandali, 2022/11/23
- master 5258f36168 7/8: Accept functions in place of passwords in ERC, Amin Bandali, 2022/11/23
- master 71397175aa 1/8: Add GS2 authorization to sasl-scram-rfc, Amin Bandali, 2022/11/23
- master ae254a65cd 5/8: Call erc-login indirectly via new generic wrapper,
Amin Bandali <=
- master ed8862c404 6/8: Add non-IRCv3 SASL module to ERC, Amin Bandali, 2022/11/23
- master da30a4908e 2/8: Don't set erc-networks--id until network is known, Amin Bandali, 2022/11/23
- master f8b410f4a1 8/8: Add test scenarios for local ERC modules, Amin Bandali, 2022/11/23
- master 4c4936fab2 4/8: Support local ERC modules in erc-mode buffers, Amin Bandali, 2022/11/23