diff options
author | Ibrahim Mkusa <ibrahimmkusa@gmail.com> | 2017-04-23 15:50:53 -0400 |
---|---|---|
committer | Ibrahim Mkusa <ibrahimmkusa@gmail.com> | 2017-04-23 15:50:53 -0400 |
commit | 1c60a61d826880bcc0be32c70392c5c931575bd3 (patch) | |
tree | 1cf7610e91a46d8a31c370b8e23f56673ef389b2 | |
parent | 28d78a8a97d9d15dc327b36a7394d35d009811e0 (diff) |
whispers are properly tagged
-rw-r--r-- | Hermes/server.rkt | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/Hermes/server.rkt b/Hermes/server.rkt index b7e928f..099d1f2 100644 --- a/Hermes/server.rkt +++ b/Hermes/server.rkt @@ -189,7 +189,7 @@ (define list-users (regexp-match #px"(.*)/list\\s+users\\s*" evt-t0)) ;; user names ; do something whether it was a message, a whisper, request for number of users and so on - ; TODO if user doesn't exist handle it******** + (cond [whisper (semaphore-wait connections-s) ; get output port for user @@ -208,7 +208,8 @@ (displayln "User is unavailable. /color black" out) (flush-output out)) (begin - (displayln (string-append (whisper-info whisper) (whisper-message whisper)) + (displayln (string-append "(whisper)" + (whisper-info whisper) (whisper-message whisper)) (get-output-port (car that-user-ports))) (flush-output (get-output-port (car that-user-ports))))) (semaphore-post connections-s)] |