diff options
Diffstat (limited to 'lisp/erc/erc-backend.el')
-rw-r--r-- | lisp/erc/erc-backend.el | 40 |
1 files changed, 23 insertions, 17 deletions
diff --git a/lisp/erc/erc-backend.el b/lisp/erc/erc-backend.el index 5acbcb05ab8..a51cec85af8 100644 --- a/lisp/erc/erc-backend.el +++ b/lisp/erc/erc-backend.el @@ -416,7 +416,7 @@ Currently this is called by `erc-send-input'." (defun erc-server-process-alive () "Return non-nil when `erc-server-process' is open or running." - (and (boundp 'erc-server-process) + (and erc-server-process (processp erc-server-process) (memq (process-status erc-server-process) '(run open)))) @@ -512,8 +512,8 @@ action." (not (string-match "^failed with code 111" event))) ;; Yuck, this should perhaps funcall ;; erc-server-reconnect-function with no args - (erc erc-session-server erc-session-port erc-server-current-nick - erc-session-user-full-name t erc-session-password) + (erc-open erc-session-server erc-session-port erc-server-current-nick + erc-session-user-full-name t erc-session-password) ;; terminate, do not reconnect (erc-display-message nil 'error (current-buffer) 'terminated ?e event)))) @@ -673,7 +673,8 @@ protection algorithm." (error nil))))) (when erc-server-flood-queue (setq erc-server-flood-timer - (run-at-time 2 nil #'erc-server-send-queue buffer)))))) + (run-at-time (+ 0.2 erc-server-flood-penalty) + nil #'erc-server-send-queue buffer)))))) (defun erc-message (message-command line &optional force) "Send LINE to the server as a privmsg or a notice. @@ -1038,11 +1039,11 @@ add things to `%s' instead." (let* ((str (cond ;; If I have joined a channel ((erc-current-nick-p nick) - (setq buffer (erc erc-session-server erc-session-port - nick erc-session-user-full-name - nil nil - erc-default-recipients chnl - erc-server-process)) + (setq buffer (erc-open erc-session-server erc-session-port + nick erc-session-user-full-name + nil nil + erc-default-recipients chnl + erc-server-process)) (when buffer (set-buffer buffer) (erc-add-default-channel chnl) @@ -1583,11 +1584,11 @@ See `erc-display-server-message'." nil "NAMES notice." nil (let ((channel (third (erc-response.command-args parsed))) (users (erc-response.contents parsed))) - (erc-with-buffer (channel proc) - (erc-channel-receive-names users)) (erc-display-message parsed 'notice (or (erc-get-buffer channel proc) 'active) - 's353 ?c channel ?u users))) + 's353 ?c channel ?u users) + (erc-with-buffer (channel proc) + (erc-channel-receive-names users)))) (define-erc-response-handler (366) "End of NAMES." nil @@ -1598,11 +1599,16 @@ See `erc-display-server-message'." nil "Channel ban list entries" nil (multiple-value-bind (channel banmask setter time) (cdr (erc-response.command-args parsed)) - (erc-display-message parsed 'notice 'active 's367 - ?c channel - ?b banmask - ?s setter - ?t time))) + ;; setter and time are not standard + (if setter + (erc-display-message parsed 'notice 'active 's367-set-by + ?c channel + ?b banmask + ?s setter + ?t (or time "")) + (erc-display-message parsed 'notice 'active 's367 + ?c channel + ?b banmask)))) (define-erc-response-handler (368) "End of channel ban list" nil |