(defvar *daemon-monitor-process* nil "Process of background monitor.")
(defparameter *timeout* 60)
-(defclass channel ()
+(defclass log-channel ()
((name :initarg :name :reader c-name
:documentation "Name of channel.")
(streams :initarg :streams :reader streams
(output-event msg :privmsg channel (trailing-argument msg))))))
(defun action-hook (msg)
- (output-event msg :action (first (arguments msg))
- (subseq (trailing-argument msg) 8
- (- (length (trailing-argument msg)) 1))))
+ (let ((end (- (length (trailing-argument msg)) 1)))
+ ;; end has been as low as 7
+ (when (< end 8)
+ (warn "End is less than 8: `$A'." msg))
+ (output-event msg :action (first (arguments msg))
+ (subseq (trailing-argument msg) (min 8 end)
+ (- (length (trailing-argument msg)) 1)))))
(defun nick-hook (msg)
(output-event msg :nick nil (trailing-argument msg)))
(defun make-a-channel (name formats output)
- (make-instance 'channel
+ (make-instance 'log-channel
:name name
:streams (make-array (length formats) :initial-element nil)
:output-root (when (and (pathnamep output)