Commit a36c8880 authored by Deniz Dogan's avatar Deniz Dogan Committed by Lars Ingebrigtsen

Clear erc user list upon disconnection

* lisp/erc/erc-backend.el (erc-process-sentinel): Clear channel user
lists upon disconnection.  This prevents invalid channel
user lists when reconnecting (bug#10947).
parent ff5f37e5
......@@ -703,6 +703,9 @@ Conditionally try to reconnect and take appropriate action."
(setq erc-server-ping-handler nil)))
(run-hook-with-args 'erc-disconnected-hook
(erc-current-nick) (system-name) "")
(dolist (buf (erc-buffer-filter (lambda () (boundp 'erc-channel-users)) cproc))
(with-current-buffer buf
(setq erc-channel-users (make-hash-table :test 'equal))))
;; Remove the prompt
(goto-char (or (marker-position erc-input-marker) (point-max)))
(forward-line 0)
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