(cond-expand (chicken-4 (require-extension irc posix)) (chicken-5 (import irc (chicken condition) (chicken time) (chicken time posix)))) (define con (irc:connection server: "irc.libera.chat" nick: "PongoTwistleton") ) (define (bleep _) (print "bleep!") (irc:say con (seconds->string (current-seconds)) "#sometemporarychannel") ) (irc:connect con) (irc:join con "#sometemporarychannel") (irc:add-message-handler! con bleep command: "PRIVMSG" body: "time") (let loop () (condition-case (irc:run-message-loop con debug: #t) (ex (i/o net) (irc:disconnect con) (print-error-message ex) (print "reconnecting ...") (irc:connect con) (loop)))) (print "exit")