Function: erc-server-PONG
erc-server-PONG is a byte-compiled function defined in
erc-backend.el.gz.
Signature
(erc-server-PONG PROC PARSED)
Documentation
Handle pong messages.
Handler for a PONG server response. PROC is the server process which returned the response. PARSED is the actual response as an ‘erc-response’ struct. If you want to add responses don’t modify this function, but rather add things to ‘erc-server-PONG-functions’ instead.
Source Code
;; Defined in /usr/src/emacs/lisp/erc/erc-backend.el.gz
(define-erc-response-handler (PONG)
"Handle pong messages." nil
(let ((time (string-to-number (erc-response.contents parsed))))
(when (> time 0)
(setq erc-server-lag (erc-time-diff time nil))
(when erc-verbose-server-ping
(erc-display-message
parsed 'notice proc 'PONG
?h (car (erc-response.command-args parsed)) ?i erc-server-lag
?s (if (/= erc-server-lag 1) "s" "")))
(erc-update-mode-line))))