USING: kernel irc.client concurrency.mailboxes namespaces ; IN: ircbot SYMBOL: bot SYMBOL: chan : botsetup "irc.freenode.org" irc-port "prhbot" f bot set "#prhchan" chan set ; : botgo ( -- ) bot get [ ] [ botsetup ] if bot get connect-irc chan get bot get add-listener ; : wr ( message -- ) chan get write-message ; : cr ( -- message ) chan get in-messages>> dup mailbox-empty? [ "empty" ] [ mailbox-get ] if ;