(output-root :initarg :output-root :reader output-root)
(current-output-names :initarg :current-output-names :accessor current-output-names)))
(output-root :initarg :output-root :reader output-root)
(current-output-names :initarg :current-output-names :accessor current-output-names)))
- :documentation "Username for cl-irc")
- (logging-stream :initarg :logging-stream :reader logging-stream
- :documentation "logging-stream for cl-irc.")
+ :documentation "Username for cl-irc")
+ (logging-stream :initarg :logging-stream :reader logging-stream
+ :documentation "logging-stream for cl-irc.")
(defmethod print-object ((obj logger) stream)
(print-unreadable-object (obj stream :type t :identity t)
(defmethod print-object ((obj logger) stream)
(print-unreadable-object (obj stream :type t :identity t)
(defun find-channel-with-name (logger name)
(find name (the list (channels logger)) :test #'string-equal :key #'c-name))
(defun find-channel-with-name (logger name)
(find name (the list (channels logger)) :test #'string-equal :key #'c-name))
(defun make-output-name (name year month day)
(format nil "~A-~4,'0D.~2,'0D.~2,'0D" (canonicalize-channel-name name)
(defun make-output-name (name year month day)
(format nil "~A-~4,'0D.~2,'0D.~2,'0D" (canonicalize-channel-name name)
(defun %log-file-path (output-root channel-name year month day type)
(make-pathname
:defaults output-root
:directory (append (pathname-directory output-root)
(defun %log-file-path (output-root channel-name year month day type)
(make-pathname
:defaults output-root
:directory (append (pathname-directory output-root)
- (list
- (string-left-trim '(#\#) channel-name)
- (format nil "~4,'0D-~2,'0D" year month)))
+ (list
+ (string-left-trim '(#\#) channel-name)
+ (format nil "~4,'0D-~2,'0D" year month)))
:name (make-output-name channel-name year month day)
:type type))
(defgeneric log-file-path (output-root channel-name year month day format))
(defmethod log-file-path (output-root channel-name year month day
:name (make-output-name channel-name year month day)
:type type))
(defgeneric log-file-path (output-root channel-name year month day format))
(defmethod log-file-path (output-root channel-name year month day
(%log-file-path output-root channel-name year month day "raw"))
(defmethod log-file-path (output-root channel-name year month day (format (eql :sexp)))
(%log-file-path output-root channel-name year month day "raw"))
(defmethod log-file-path (output-root channel-name year month day (format (eql :sexp)))
(let ((name (make-output-name-utime (c-name channel) utime)))
(unless (string= name (get-output-name channel istream))
(when (get-stream channel istream)
(let ((name (make-output-name-utime (c-name channel) utime)))
(unless (string= name (get-output-name channel istream))
(when (get-stream channel istream)
- (write-file-footer (get-format logger istream)
- (c-name channel)
- (get-stream channel istream))
- (close (get-stream channel istream)))
+ (write-file-footer (get-format logger istream)
+ (c-name channel)
+ (get-stream channel istream))
+ (close (get-stream channel istream)))
(setf (get-output-name channel istream) name)
(let ((path (log-file-path-utime (output-root channel) (c-name channel)
(setf (get-output-name channel istream) name)
(let ((path (log-file-path-utime (output-root channel) (c-name channel)
- (get-format logger istream) utime)))
- (unless (probe-file path)
- (ensure-directories-exist path)
- (setf (get-stream channel istream)
- (open path :direction :output :if-exists :error
- :if-does-not-exist :create))
- (write-file-header (get-format logger istream)
- (c-name channel)
- (get-stream channel istream))
- (close (get-stream channel istream)))
- (setf (get-stream channel istream)
- (open path :direction :output :if-exists :append
- :if-does-not-exist :create))))))
+ (get-format logger istream) utime)))
+ (unless (probe-file path)
+ (ensure-directories-exist path)
+ (setf (get-stream channel istream)
+ (open path :direction :output :if-exists :error
+ :if-does-not-exist :create))
+ (write-file-header (get-format logger istream)
+ (c-name channel)
+ (get-stream channel istream))
+ (close (get-stream channel istream)))
+ (setf (get-stream channel istream)
+ (open path :direction :output :if-exists :append
+ :if-does-not-exist :create))))))
(defun ensure-output-stream (utime logger channel istream)
"Ensures that *output-stream* is correct."
(defun ensure-output-stream (utime logger channel istream)
"Ensures that *output-stream* is correct."
(ensure-output-stream-for-unichannel utime logger channel istream))
(t
(setf (get-stream channel istream)
(ensure-output-stream-for-unichannel utime logger channel istream))
(t
(setf (get-stream channel istream)
- (open (user-output logger) :direction :output :if-exists :append
- :if-does-not-exist :create)))))))
+ (open (user-output logger) :direction :output :if-exists :append
+ :if-does-not-exist :create)))))))
(%output-event :raw stream utime type channel source text msg unichannel))
(defmethod %output-event ((format (eql :raw)) stream utime type channel source
(%output-event :raw stream utime type channel source text msg unichannel))
(defmethod %output-event ((format (eql :raw)) stream utime type channel source
((eq type :rpl_topicwhotime)
(when (stringp (car (last (arguments msg))))
(let ((secs (parse-integer (car (last (arguments msg))) :junk-allowed t)))
((eq type :rpl_topicwhotime)
(when (stringp (car (last (arguments msg))))
(let ((secs (parse-integer (car (last (arguments msg))) :junk-allowed t)))
((need-user-address? type)
(user-address msg))))
(defmethod %output-event ((format (eql :sexp)) stream utime type channel source text
((need-user-address? type)
(user-address msg))))
(defmethod %output-event ((format (eql :sexp)) stream utime type channel source text
- (format stream "(~S ~S ~S ~S ~S)~%" utime type source text (last-sexp-field type msg))
- (format stream "(~S ~S ~S ~S ~S ~S)~%" utime type source channel text
- (last-sexp-field type msg))))))
+ (format stream "(~S ~S ~S ~S ~S)~%" utime type source text (last-sexp-field type msg))
+ (format stream "(~S ~S ~S ~S ~S ~S)~%" utime type source channel text
+ (last-sexp-field type msg))))))
(format stream "~A " (format-utime utime 0))
(when (and (null unichannel) channel)
(format stream "[~A] " channel))
(format stream "~A " (format-utime utime 0))
(when (and (null unichannel) channel)
(format stream "[~A] " channel))
(defun output-event-for-a-stream (msg type channel text logger istream)
(ensure-output-stream (received-time msg) logger channel istream)
(%output-event (get-format logger istream) (get-stream channel istream)
(defun output-event-for-a-stream (msg type channel text logger istream)
(ensure-output-stream (received-time msg) logger channel istream)
(%output-event (get-format logger istream) (get-stream channel istream)
- (ensure-output-stream time logger channel istream)
- (%output-event (get-format logger istream)
- (get-stream channel istream)
- time :daemon nil nil text nil
- (unichannel logger))
- (force-output (get-stream channel istream))))))
+ (ensure-output-stream time logger channel istream)
+ (%output-event (get-format logger istream)
+ (get-stream channel istream)
+ time :daemon nil nil text nil
+ (unichannel logger))
+ (force-output (get-stream channel istream))))))
- (case type
- (:nick (source msg))
- (:quit (source msg)))))
- (channels (when user (cl-irc::channels user))))
- (dolist (channel (mapcar
- #'(lambda (name) (find-channel-with-name logger name))
- (mapcar #'cl-irc::name channels)))
- (when channel
- (dotimes (i (length (formats logger)))
- (output-event-for-a-stream msg type channel text logger i))))))
+ (case type
+ (:nick (source msg))
+ (:quit (source msg)))))
+ (channels (when user (cl-irc::channels user))))
+ (dolist (channel (mapcar
+ #'(lambda (name) (find-channel-with-name logger name))
+ (mapcar #'cl-irc::name channels)))
+ (when channel
+ (dotimes (i (length (formats logger)))
+ (output-event-for-a-stream msg type channel text logger i))))))
- (when channel
- (dotimes (i (length (formats logger)))
- (output-event-for-a-stream msg type channel text logger i))))))))
+ (when channel
+ (dotimes (i (length (formats logger)))
+ (output-event-for-a-stream msg type channel text logger i))))))))
- (format-date-time (get-universal-time) :stream stream)
- (write-char #\space stream)
- (apply #'format stream fmt args)
- (write-char #\newline stream)
- (force-output stream))
+ (format-date-time (get-universal-time) :stream stream)
+ (write-char #\space stream)
+ (apply #'format stream fmt args)
+ (write-char #\newline stream)
+ (force-output stream))
- (string-equal channel (l-nickname logger))
- (string-equal "owned by someone else" (trailing-argument msg)))
+ (string-equal channel (l-nickname logger))
+ (string-equal "owned by someone else" (trailing-argument msg)))
- (privmsg (connection msg) (source msg) (format nil "IDENTIFY ~A" (password logger)))
- (add-private-log-entry logger "NickServ asks for identity with connection not found.")))
+ (privmsg (connection msg) (source msg) (format nil "IDENTIFY ~A" (password logger)))
+ (add-private-log-entry logger "NickServ asks for identity with connection not found.")))
(defun pong-hook (msg)
(let ((logger (find-logger-with-connection (connection msg))))
(setf (last-pong logger) (received-time msg))))
(defun pong-hook (msg)
(let ((logger (find-logger-with-connection (connection msg))))
(setf (last-pong logger) (received-time msg))))
- :name name
- :streams (make-array (length formats) :initial-element nil)
- :output-root (when (and (pathnamep output)
- (null (pathname-name output)))
- output)
- :current-output-names (make-array (length formats)
- :initial-element nil)))
-
+ :name name
+ :streams (make-array (length formats) :initial-element nil)
+ :output-root (when (and (pathnamep output)
+ (null (pathname-name output)))
+ output)
+ :current-output-names (make-array (length formats)
+ :initial-element nil)))
+
(defun is-unichannel-output (user-output)
"Returns T if output is setup for a single channel directory structure."
(defun is-unichannel-output (user-output)
"Returns T if output is setup for a single channel directory structure."
(defun do-connect-and-join (nick server username realname logging-stream channels)
(let ((conn (connect :nickname nick :server server
(defun do-connect-and-join (nick server username realname logging-stream channels)
(let ((conn (connect :nickname nick :server server
(mapc #'(lambda (channel) (join conn channel)) channels)
(add-hook conn 'irc::irc-privmsg-message 'privmsg-hook)
(add-hook conn 'irc::ctcp-action-message 'action-hook)
(mapc #'(lambda (channel) (join conn channel)) channels)
(add-hook conn 'irc::irc-privmsg-message 'privmsg-hook)
(add-hook conn 'irc::ctcp-action-message 'action-hook)
(let ((result (call-next-method msg)))
(typecase msg
((or irc::irc-privmsg-message irc::ctcp-action-message irc::irc-nick-message
(let ((result (call-next-method msg)))
(typecase msg
((or irc::irc-privmsg-message irc::ctcp-action-message irc::irc-nick-message
- irc::irc-part-message irc::irc-quit-message irc::irc-join-message
- irc::irc-kick-message irc::irc-mode-message irc::irc-topic-message
- irc::irc-notice-message irc::irc-error-message irc::irc-ping-message
- irc::irc-pong-message irc::irc-kill-message irc::irc-invite-message
- irc::irc-rpl_killdone-message irc::irc-rpl_closing-message
- irc::irc-rpl_topic-message irc::irc-rpl_namreply-message
- irc::irc-rpl_endofnames-message irc::irc-rpl_topicwhotime-message
- irc::irc-rpl_motd-message irc::irc-rpl_motdstart-message
- irc::irc-rpl_endofmotd-message)
+ irc::irc-part-message irc::irc-quit-message irc::irc-join-message
+ irc::irc-kick-message irc::irc-mode-message irc::irc-topic-message
+ irc::irc-notice-message irc::irc-error-message irc::irc-ping-message
+ irc::irc-pong-message irc::irc-kill-message irc::irc-invite-message
+ irc::irc-rpl_killdone-message irc::irc-rpl_closing-message
+ irc::irc-rpl_topic-message irc::irc-rpl_namreply-message
+ irc::irc-rpl_endofnames-message irc::irc-rpl_topicwhotime-message
+ irc::irc-rpl_motd-message irc::irc-rpl_motdstart-message
+ irc::irc-rpl_endofmotd-message)
- (get-unknown-log-stream (find-logger-with-connection (connection msg)))
- "~A"
- (raw-message-string msg))))
+ (get-unknown-log-stream (find-logger-with-connection (connection msg)))
+ "~A"
+ (raw-message-string msg))))
- realname username async
- private-log unknown-log
- (logging-stream t) (formats '(:text)))
+ realname username async
+ private-log unknown-log
+ (logging-stream t) (formats '(:text)))
(if (stringp output)
(setq output (parse-namestring output)))
(let* ((conn (do-connect-and-join nick server username realname logging-stream channels))
(if (stringp output)
(setq output (parse-namestring output)))
(let* ((conn (do-connect-and-join nick server username realname logging-stream channels))
- (logger (make-instance
- 'logger
- :connection conn
- :nick nick
- :password password
- :server server
- :channels (make-channels channels formats output)
- :channel-names channels
- :username username
- :realname realname
- :async async
- :logging-stream logging-stream
- :user-output output
- :formats formats
- :private-log private-log
- :unknown-log unknown-log
- :private-log-stream (when private-log
- (open private-log :direction :output
- :if-exists :append
- :if-does-not-exist :create))
- :unknown-log-stream (when unknown-log
- (open unknown-log :direction :output
- :if-exists :append
- :if-does-not-exist :create))
- :unichannel (is-unichannel-output output))))
+ (logger (make-instance
+ 'logger
+ :connection conn
+ :nick nick
+ :password password
+ :server server
+ :channels (make-channels channels formats output)
+ :channel-names channels
+ :username username
+ :realname realname
+ :async async
+ :logging-stream logging-stream
+ :user-output output
+ :formats formats
+ :private-log private-log
+ :unknown-log unknown-log
+ :private-log-stream (when private-log
+ (open private-log :direction :output
+ :if-exists :append
+ :if-does-not-exist :create))
+ :unknown-log-stream (when unknown-log
+ (open unknown-log :direction :output
+ :if-exists :append
+ :if-does-not-exist :create))
+ :unichannel (is-unichannel-output output))))
(unless *daemon-monitor-process*
(setq *daemon-monitor-process* (cl-irc::start-process 'daemon-monitor "logger-monitor")))
logger))
(unless *daemon-monitor-process*
(setq *daemon-monitor-process* (cl-irc::start-process 'daemon-monitor "logger-monitor")))
logger))
- "~A No active connection found with nick ~A [remove-logger].~%"
- (format-date-time (get-universal-time))
- nick)
+ "~A No active connection found with nick ~A [remove-logger].~%"
+ (format-date-time (get-universal-time))
+ nick)
nil)
(t
(ignore-errors (quit-with-timeout (connection logger) ""))
(ignore-errors (stop-background-message-handler (handler logger)))
(sleep 1)
(ignore-errors
nil)
(t
(ignore-errors (quit-with-timeout (connection logger) ""))
(ignore-errors (stop-background-message-handler (handler logger)))
(sleep 1)
(ignore-errors
- (let* ((c (connection logger))
- (user (find-user c (l-nickname logger))))
- (when (and c user)
- (dolist (channel (channels logger))
- (remove-channel user channel)))))
+ (let* ((c (connection logger))
+ (user (find-user c (l-nickname logger))))
+ (when (and c user)
+ (dolist (channel (channels logger))
+ (remove-channel user channel)))))
(ignore-errors (add-private-log-entry logger "Deleting loggers with nick of '~A' [remove-logger]." nick))
(when (private-log-stream logger)
(ignore-errors (add-private-log-entry logger "Deleting loggers with nick of '~A' [remove-logger]." nick))
(when (private-log-stream logger)
(ignore-errors (remove-logger nick)))
(add-private-log-entry nil "Calling create-logger [add-logger].~%")
(let ((logger
(ignore-errors (remove-logger nick)))
(add-private-log-entry nil "Calling create-logger [add-logger].~%")
(let ((logger
- (do ((new-logger
- (#-sbcl mp:with-timeout #-sbcl (*timeout* nil)
- #+sbcl sb-ext:with-timeout #+sbcl *timeout*
- (create-logger nick server :channels channels :output output
- :logging-stream logging-stream :password password
- :realname realname :username username
- :private-log private-log
- :unknown-log unknown-log
- :formats formats
- :async async))
- (#-sbcl mp:with-timeout #-sbcl (*timeout* nil)
- #+sbcl sb-ext:with-timeout #+sbcl *timeout*
- (create-logger nick server :channels channels :output output
- :logging-stream logging-stream :password password
- :realname realname :username username
- :private-log private-log
- :unknown-log unknown-log
- :formats formats
- :async async))))
- (new-logger
- (progn
- (add-private-log-entry nil "Acquired new logger ~A." new-logger)
- new-logger))
- (add-private-log-entry nil "Timeout trying to create new logger [add-logger]."))))
+ (do ((new-logger
+ (#-sbcl mp:with-timeout #-sbcl (*timeout* nil)
+ #+sbcl sb-ext:with-timeout #+sbcl *timeout*
+ (create-logger nick server :channels channels :output output
+ :logging-stream logging-stream :password password
+ :realname realname :username username
+ :private-log private-log
+ :unknown-log unknown-log
+ :formats formats
+ :async async))
+ (#-sbcl mp:with-timeout #-sbcl (*timeout* nil)
+ #+sbcl sb-ext:with-timeout #+sbcl *timeout*
+ (create-logger nick server :channels channels :output output
+ :logging-stream logging-stream :password password
+ :realname realname :username username
+ :private-log private-log
+ :unknown-log unknown-log
+ :formats formats
+ :async async))))
+ (new-logger
+ (progn
+ (add-private-log-entry nil "Acquired new logger ~A." new-logger)
+ new-logger))
+ (add-private-log-entry nil "Timeout trying to create new logger [add-logger]."))))
(add-private-log-entry logger "Pushing newly created logger ~A [add-logger].~%" logger)
(push logger *loggers*)
(start-logger logger async)
logger))
(add-private-log-entry logger "Pushing newly created logger ~A [add-logger].~%" logger)
(push logger *loggers*)
(start-logger logger async)
logger))
- (when (streamp (get-stream channel i))
- (close (get-stream channel i))
- (setf (get-stream channel i) nil)))
+ (when (streamp (get-stream channel i))
+ (close (get-stream channel i))
+ (setf (get-stream channel i) nil)))
(setf (warning-message-utime logger) (received-time msg)))
(add-private-log-entry logger "Killed by ~A" (source msg))))
(defun error-hook (msg)
(let ((text (trailing-argument msg))
(setf (warning-message-utime logger) (received-time msg)))
(add-private-log-entry logger "Killed by ~A" (source msg))))
(defun error-hook (msg)
(let ((text (trailing-argument msg))
- (logger (find-logger-with-connection (connection msg))))
- (when (and (stringp text)
- (eql 0 (search (format nil "Closing Link: ~A"
- (l-nickname logger)) text)))
+ (logger (find-logger-with-connection (connection msg))))
+ (when (and (stringp text)
+ (eql 0 (search (format nil "Closing Link: ~A"
+ (l-nickname logger)) text)))
(setf (warning-message-utime logger) (received-time msg)))
(output-event msg :error nil (trailing-argument msg))))
(defun warning-hook (msg)
(let ((logger (find-logger-with-connection (connection msg))))
(setf (warning-message-utime logger) (received-time msg)))
(output-event msg :error nil (trailing-argument msg))))
(defun warning-hook (msg)
(let ((logger (find-logger-with-connection (connection msg))))
- (output-event msg :server
- (format nil "~{~A~^ ~} ~A)"
- (arguments msg)
- (trailing-argument msg)))
+ (output-event msg :server
+ (format nil "~{~A~^ ~} ~A)"
+ (arguments msg)
+ (trailing-argument msg)))
(defun daemon-sleep (seconds)
#-allegro (sleep seconds)
#+allegro (mp:process-sleep seconds))
(defun daemon-sleep (seconds)
#-allegro (sleep seconds)
#+allegro (mp:process-sleep seconds))
(defun log-disconnection (logger)
;; avoid generating too many reconnect messages in the logs
(when (or (null (warning-message-utime logger))
(defun log-disconnection (logger)
;; avoid generating too many reconnect messages in the logs
(when (or (null (warning-message-utime logger))
(log-daemon-message logger "Disconnected. Attempting reconnection.")))
(defun log-reconnection (logger)
(log-daemon-message logger "Disconnected. Attempting reconnection.")))
(defun log-reconnection (logger)
(defun is-connected (logger)
#-allegro (%is-connected logger)
#+allegro (mp:with-timeout (*timeout* nil)
(defun is-connected (logger)
#-allegro (%is-connected logger)
#+allegro (mp:with-timeout (*timeout* nil)
(defun quit-with-timeout (connection msg)
#-allegro (quit connection msg)
#+allegro (mp:with-timeout (*timeout* nil)
(defun quit-with-timeout (connection msg)
#-allegro (quit connection msg)
#+allegro (mp:with-timeout (*timeout* nil)
(defun %is-connected (logger)
(when (ignore-errors (ping (connection logger) (server logger)))
(dotimes (i 20)
(when (and (last-pong logger)
(defun %is-connected (logger)
(when (ignore-errors (ping (connection logger) (server logger)))
(dotimes (i 20)
(when (and (last-pong logger)
*recon-user-output* *recon-private-log* *recon-unknown-log*
*recon-formats* *recon-async* *recon-logging-stream* *recon-channel-names*)
(declare (special *recon-nick* *recon-server* *recon-username* *recon-realname*
*recon-user-output* *recon-private-log* *recon-unknown-log*
*recon-formats* *recon-async* *recon-logging-stream* *recon-channel-names*)
(declare (special *recon-nick* *recon-server* *recon-username* *recon-realname*
- *recon-formats* *recon-password* *recon-async*
- *recon-user-output* *recon-private-log* *recon-unknown-log*
- *recon-logging-stream* *recon-channel-names*))
-
+ *recon-formats* *recon-password* *recon-async*
+ *recon-user-output* *recon-private-log* *recon-unknown-log*
+ *recon-logging-stream* *recon-channel-names*))
+
(defun attempt-reconnection (logger)
(when (is-connected logger)
(return-from attempt-reconnection nil))
(defun attempt-reconnection (logger)
(when (is-connected logger)
(return-from attempt-reconnection nil))
(log-disconnection logger)
(when (connection logger)
(ignore-errors (quit-with-timeout (connection logger) "Client terminated by server"))
(setf *recon-nick* (l-nickname logger)
(log-disconnection logger)
(when (connection logger)
(ignore-errors (quit-with-timeout (connection logger) "Client terminated by server"))
(setf *recon-nick* (l-nickname logger)
- *recon-server* (server logger)
- *recon-username* (l-username logger)
- *recon-realname* (l-realname logger)
- *recon-password* (password logger)
- *recon-async* (async logger)
- *recon-user-output* (user-output logger)
- *recon-private-log* (private-log logger)
- *recon-unknown-log* (unknown-log logger)
- *recon-formats* (formats logger)
- *recon-logging-stream* (logging-stream logger)
- *recon-channel-names* (channel-names logger))
+ *recon-server* (server logger)
+ *recon-username* (l-username logger)
+ *recon-realname* (l-realname logger)
+ *recon-password* (password logger)
+ *recon-async* (async logger)
+ *recon-user-output* (user-output logger)
+ *recon-private-log* (private-log logger)
+ *recon-unknown-log* (unknown-log logger)
+ *recon-formats* (formats logger)
+ *recon-logging-stream* (logging-stream logger)
+ *recon-channel-names* (channel-names logger))
(defun monitor-once ()
(dolist (logger *loggers*)
(do ((warning-time (warning-message-utime logger) (warning-message-utime logger)))
(defun monitor-once ()
(dolist (logger *loggers*)
(do ((warning-time (warning-message-utime logger) (warning-message-utime logger)))
- ((and warning-time (> (- (get-universal-time) warning-time) 180))
- ;;give up frequent checking because no disconnection despite waiting
- (setf (warning-message-utime logger) nil))
- ((not (is-connected logger))
- (unless warning-time
- (setf (warning-message-utime logger) (get-universal-time)))
- (attempt-reconnection logger)
- ;;after a succesful reconnection, the value of logger will be invalid
- (sleep 30)
- (return-from monitor-once))
- (t
- (daemon-sleep 30)))))
+ ((and warning-time (> (- (get-universal-time) warning-time) 180))
+ ;;give up frequent checking because no disconnection despite waiting
+ (setf (warning-message-utime logger) nil))
+ ((not (is-connected logger))
+ (unless warning-time
+ (setf (warning-message-utime logger) (get-universal-time)))
+ (attempt-reconnection logger)
+ ;;after a succesful reconnection, the value of logger will be invalid
+ (sleep 30)
+ (return-from monitor-once))
+ (t
+ (daemon-sleep 30)))))