source: project/release/4/irc/bot.scm @ 15651

Last change on this file since 15651 was 15651, checked in by felix winkelmann, 10 years ago

ported to chicken 4

File size: 568 bytes
Line 
1(require-extension irc posix)
2
3(define con
4  (irc:connection server: "irc.freenode.net" nick: "PongoTwistleton") )
5
6(define (bleep _)
7  (print "bleep!")
8  (irc:say con (seconds->string (current-seconds)) "#tmpempty") )
9
10(irc:connect con)
11
12(irc:join con "#tmpempty")
13
14(irc:add-message-handler!
15 con bleep
16 command: "PRIVMSG" body: "time")
17
18(let loop ()
19  (condition-case (irc:run-message-loop con debug: #t)
20    (ex (i/o net) 
21     (irc:disconnect con)
22     (print-error-message ex)
23     (print "reconnecting ...")
24     (irc:connect con)
25     (loop))))
26
27(print "exit")
Note: See TracBrowser for help on using the repository browser.