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:
da78b24
)
refactoring args to default-handle-privmsg
author
Christopher Allan Webber
<cwebber@dustycloud.org>
Mon, 23 Nov 2015 21:20:26 +0000
(15:20 -0600)
committer
Christopher Allan Webber
<cwebber@dustycloud.org>
Mon, 23 Nov 2015 21:20:26 +0000
(15:20 -0600)
demos/irc.scm
patch
|
blob
|
history
diff --git
a/demos/irc.scm
b/demos/irc.scm
index ab6c7c7195876b5843abd9f41ff7df6bb79d1b20..eabc31d82b3baa44eb73f62db4df9ab55ea14d02 100755
(executable)
--- a/
demos/irc.scm
+++ b/
demos/irc.scm
@@
-162,12
+162,13
@@
(string-join (cons first-word rest-message) " ")
#f)))))
(string-join (cons first-word rest-message) " ")
#f)))))
-(define (default-handle-privmsg irc-line username channel-name message is-action)
+(define (default-handle-privmsg my-name speaker
+ channel-name message is-action)
(if is-action
(format #t "~a emoted ~s in channel ~a\n"
(if is-action
(format #t "~a emoted ~s in channel ~a\n"
-
username
message channel-name)
+
speaker
message channel-name)
(format #t "~a said ~s in channel ~a\n"
(format #t "~a said ~s in channel ~a\n"
-
username
message channel-name)))
+
speaker
message channel-name)))
(define* (make-handle-line #:key
(handle-privmsg default-handle-privmsg))
(define* (make-handle-line #:key
(handle-privmsg default-handle-privmsg))
@@
-180,7
+181,7
@@
(receive (channel-name message is-action)
(condense-privmsg-line (irc-line-params parsed-line))
(let ((username (irc-line-username parsed-line)))
(receive (channel-name message is-action)
(condense-privmsg-line (irc-line-params parsed-line))
(let ((username (irc-line-username parsed-line)))
- (handle-privmsg
parsed-lin
e username channel-name message is-action))))
+ (handle-privmsg
my-usernam
e username channel-name message is-action))))
(_
(display line)
(newline)))))
(_
(display line)
(newline)))))