(format stream "~S~%"
(string-right-trim '(#\return) (raw-message-string msg)))))
+(defconstant +posix-epoch+
+ (encode-universal-time 0 0 0 1 1 1970 0))
+
+(defun posix-time-to-utime (time)
+ (+ time +posix-epoch+))
+
(defun last-sexp-field (type msg)
(cond
((null msg)
nil)
((eq type :kick)
(trailing-argument msg))
+ ((eq type :rpl_topicwhotime)
+ (when (stringp (car (last (arguments msg))))
+ (let ((secs (parse-integer (car (last (arguments msg))) :junk-allowed t)))
+ (when secs
+ (posix-time-to-utime secs)))))
((need-user-address? type)
(user-address msg))))
(defun rpl_topicwhotime-hook (msg)
(output-event msg :rpl_topicwhotime
- (format nil "~{~A~^ ~}" (arguments msg))
- (trailing-argument msg)))
+ (second (arguments msg))
+ (third (arguments msg))))
(defun invite-hook (msg)
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 irc::irc-rpl_motdstart-message irc::irc-rpl_endofmotd-message)
+ irc::irc-rpl_motd-message irc::irc-rpl_motdstart-message
+ irc::irc-rpl_endofmotd-message)
;; nothing to do
)
(t
(defun add-logger (nick server &key channels output (password "")
realname username private-log unknown-log
(logging-stream t) (async t)
- (formats '(:text)))
+ (formats '(:sexp)))
(when (find-logger-with-nick nick)
(format
(get-private-log-stream (find-logger-with-nick nick))