Add quit-world action to chat.rkt
This commit is contained in:
parent
d7095c9995
commit
974c21e5d0
|
@ -17,7 +17,10 @@
|
|||
(lambda (e)
|
||||
(match e
|
||||
[(message (at-meta (tcp-channel _ _ bs)))
|
||||
(message `(,user says ,(string-trim (bytes->string/utf-8 bs))))]
|
||||
(define input-string (string-trim (bytes->string/utf-8 bs)))
|
||||
(if (equal? input-string "quit-world")
|
||||
(quit-world)
|
||||
(message `(,user says ,input-string)))]
|
||||
[(message `(,who says ,what))
|
||||
(say who "says: ~a" what)]
|
||||
[(? patch? p)
|
||||
|
|
Loading…
Reference in New Issue