Commit 361bbf57 authored by Chong Yidong's avatar Chong Yidong
Browse files

Fix erc reconnection via non-default connectors (Bug#4958).

* erc-backend.el (erc-session-connector): New var.
(erc-server-reconnect): Use it to reconnect via old connector (Bug#4958).

* erc.el (erc-determine-parameters): Save erc-server-connect-function to erc-session-connector.
parent e2396d80
2010-01-25 Vivek Dasmohapatra <vivek@etla.org>
* erc-backend.el (erc-session-connector): New var.
(erc-server-reconnect): Use it to reconnect via old
connector (Bug#4958).
* erc.el (erc-determine-parameters): Save
erc-server-connect-function to erc-session-connector.
2009-11-03 Stefan Monnier <monnier@iro.umontreal.ca>
* erc.el (erc-display-line-1, erc-process-away):
......
......@@ -130,6 +130,10 @@ Use `erc-current-nick' to access this.")
"The server name used to connect to for this session.")
(make-variable-buffer-local 'erc-session-server)
(defvar erc-session-connector nil
"The function used to connect to this session (nil for the default).")
(make-variable-buffer-local 'erc-session-connector)
(defvar erc-session-port nil
"The port used to connect to.")
(make-variable-buffer-local 'erc-session-port)
......@@ -538,8 +542,10 @@ Make sure you are in an ERC buffer when running this."
(erc-set-active-buffer (current-buffer))
(setq erc-server-last-sent-time 0)
(setq erc-server-lines-sent 0)
(erc-open erc-session-server erc-session-port erc-server-current-nick
erc-session-user-full-name t erc-session-password))))
(let ((erc-server-connect-function (or erc-session-connector
'open-network-stream)))
(erc-open erc-session-server erc-session-port erc-server-current-nick
erc-session-user-full-name t erc-session-password)))))
(defun erc-server-filter-function (process string)
"The process filter for the ERC server."
......
......@@ -5654,11 +5654,13 @@ user input."
"Determine the connection and authentication parameters.
Sets the buffer local variables:
- `erc-session-connector'
- `erc-session-server'
- `erc-session-port'
- `erc-session-full-name'
- `erc-server-current-nick'"
(setq erc-session-server (erc-compute-server server)
(setq erc-session-connector erc-server-connect-function
erc-session-server (erc-compute-server server)
erc-session-port (or port erc-default-port)
erc-session-user-full-name (erc-compute-full-name name))
(erc-set-current-nick (erc-compute-nick nick)))
......
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