IRC Client

Simple IRC Client.

Example

;; Just echo back
(import (rnrs)
        (match)
        (mosh irc client))

(irc-client
 "irc.freenode.net" "6666" "kaela" "#higepon"
 (lambda (msg return privmsg send)
   (match msg
     [('PRIVMSG who message)
      (privmsg message)]
     [else #f])))

Example2

;; Logger
(import (rnrs)
        (mosh)
        (match)
        (only (srfi :19 time) date->string current-date)
        (mosh irc client))
(irc-client
 "irc.freenode.net" "6666" "kaela" "#higepon"
 (lambda (msg return privmsg send)
   (match msg
     [('PRIVMSG who message)
      (format #t "~a <~a> ~a\n" (date->string (current-date) "~H:~M") who message)]
     [('STATUS 433 messaage)
      (error 'irc (format "~a" messaage))]
     [('NICK from to)
      (format #t "nick from =~a to =~a\n" from to)]
     [('PART name)
      (format #t "part name=~a\n" name)]
     [('JOIN name)
      (format #t "join name=~a\n" name)]
     [('TOPIC who topic)
      (format #t "topic who=~a topic=~a\n" who topic)]
     [('ERROR e)
      (return e)]
     [('RAW text)
      #;(format (current-error-port) "LOG:~a\n" text)
      #f]
     [else #f])))
Summary
IRC ClientSimple IRC Client.
(mosh irc client)IRC Client Library
Functions
irc-client

(mosh irc client)

IRC Client Library

Functions

irc-client

Prototype

(irc-client server port nick channel client-proc)
Close