Function: erc-notify-timer
erc-notify-timer is a byte-compiled function defined in
erc-notify.el.gz.
Signature
(erc-notify-timer NOW)
Source Code
;; Defined in /usr/src/emacs/lisp/erc/erc-notify.el.gz
;;;; Timer handler
(defun erc-notify-timer (now)
(when (and erc-server-connected
erc-notify-list
(> (erc-time-diff
erc-last-ison-time now)
erc-notify-interval))
(erc-once-with-server-event
303
(lambda (proc parsed)
(let* ((server (erc-response.sender parsed))
(ison-list (delete "" (split-string
(erc-response.contents parsed))))
(new-list ison-list)
(old-list (erc-with-server-buffer erc-last-ison)))
(while new-list
(when (not (erc-member-ignore-case (car new-list) old-list))
(run-hook-with-args 'erc-notify-signon-hook server (car new-list))
(erc-display-message
parsed 'notice proc
'notify_on ?n (car new-list) ?m (erc-network-name)))
(setq new-list (cdr new-list)))
(while old-list
(when (not (erc-member-ignore-case (car old-list) ison-list))
(run-hook-with-args 'erc-notify-signoff-hook server (car old-list))
(erc-display-message
parsed 'notice proc
'notify_off ?n (car old-list) ?m (erc-network-name)))
(setq old-list (cdr old-list)))
(setq erc-last-ison ison-list)
t)))
(erc-server-send
(concat "ISON " (mapconcat #'identity erc-notify-list " ")))
(setq erc-last-ison-time now)))