You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
32 lines
533 B
32 lines
533 B
#lang racket
|
|
|
|
; This module builds strings for requisite IRC commands
|
|
|
|
; PRIVMSG command
|
|
(define (privmsg target msg)
|
|
(format "PRIVMSG ~a :~a"
|
|
target
|
|
msg))
|
|
|
|
; USER command
|
|
(define (usermsg username realname)
|
|
(format
|
|
"USER ~a 0 * :~a" username realname))
|
|
|
|
; JOIN command
|
|
(define (join channel)
|
|
(format
|
|
"JOIN :~a" channel))
|
|
|
|
; PART command
|
|
(define (part channel reason)
|
|
(format
|
|
"PART ~a :~a"
|
|
channel
|
|
reason))
|
|
|
|
; QUIT command
|
|
(define (quit reason)
|
|
(format "QUIT :~a"
|
|
reason))
|
|
|