(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)))