projects
/
8sync.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (from parent 1:
1827de0
)
Accept a list of channels via the command line
author
Christopher Allan Webber
<cwebber@dustycloud.org>
Mon, 23 Nov 2015 00:57:29 +0000
(18:57 -0600)
committer
Christopher Allan Webber
<cwebber@dustycloud.org>
Mon, 23 Nov 2015 00:57:29 +0000
(18:57 -0600)
demos/irc.scm
patch
|
blob
|
history
diff --git
a/demos/irc.scm
b/demos/irc.scm
index 84b5528dbfc2e3111b4c2cf5a058c253fc05d7fe..7a8d2ab020e478b740699b893e12fb24cd525c00 100755
(executable)
--- a/
demos/irc.scm
+++ b/
demos/irc.scm
@@
-65,7
+65,7
@@
(display (irc-line dest))))
(define* (handle-login socket username
(display (irc-line dest))))
(define* (handle-login socket username
- #:
optional
+ #:
key
(hostname "*")
(servername "*")
(realname username)
(hostname "*")
(servername "*")
(realname username)
@@
-130,6
+130,7
@@
,(lambda (s)
(if (string->number s) #t #f))))
(username (single-char #\u) (required? #t) (value #t))
,(lambda (s)
(if (string->number s) #t #f))))
(username (single-char #\u) (required? #t) (value #t))
+ (channels (value #t))
(listen)))
(define (main args)
(listen)))
(define (main args)
@@
-138,13
+139,15
@@
(port (or (option-ref options 'port #f)
default-irc-port))
(username (option-ref options 'username #f))
(port (or (option-ref options 'port #f)
default-irc-port))
(username (option-ref options 'username #f))
- (listen (option-ref options 'listen #f)))
+ (listen (option-ref options 'listen #f))
+ (channels (option-ref options 'channels "")))
(display `((server ,hostname) (port ,port) (username ,username)
(display `((server ,hostname) (port ,port) (username ,username)
- (listen ,listen)))
+ (listen ,listen)
(channels-split ,(string-split channels #\space))
))
(newline)
(queue-and-start-irc-agenda!
(make-agenda)
(irc-socket-setup hostname port)
#:inet-port port
#:username username
(newline)
(queue-and-start-irc-agenda!
(make-agenda)
(irc-socket-setup hostname port)
#:inet-port port
#:username username
- #:handler (make-simple-irc-handler handle-line))))
+ #:handler (make-simple-irc-handler handle-line)
+ #:channels (string-split channels #\space))))