bug fix: no longer attaches username to every received message.

This commit is contained in:
Ibrahim Mkusa 2017-04-23 04:04:45 -04:00
parent ed5d1d7571
commit 6b85be6490
2 changed files with 7 additions and 4 deletions

View File

@ -130,7 +130,9 @@
(define color (substring user-input (+ 2 (string-length username) (string-length input)))) (define color (substring user-input (+ 2 (string-length username) (string-length input))))
(send dc set-text-foreground color) ; set dc's text color to user (send dc set-text-foreground color) ; set dc's text color to user
; provided ; provided
(send dc draw-text (string-append username ":" input) 0 height) ; (send dc draw-text (string-append username ":" input) 0 height)
(send dc draw-text input 0 height) ;; just print message to string
(set! listy (appendlist listy (list username input color height))) (set! listy (appendlist listy (list username input color height)))
(set! height (+ height 15)) (set! height (+ height 15))
; redraw overly long text on gui ; redraw overly long text on gui
@ -149,10 +151,10 @@
;; draws messages to the screen canvas as text ;; draws messages to the screen canvas as text
(define (re-draw-message username input color in-height) (define (re-draw-message username input color in-height)
(begin
(send dc set-text-foreground color) (send dc set-text-foreground color)
(send dc draw-text (string-append username ":" input) 0 in-height) ; (send dc draw-text (string-append username ":" input) 0 in-height)
)) (send dc draw-text input 0 in-height)
)
; used when redrawing the screen along with its helper. ; used when redrawing the screen along with its helper.
(define (update given-list) (define (update given-list)

View File

@ -101,6 +101,7 @@
(flush-output out) (flush-output out)
(close-output-port error-out) (close-output-port error-out)
(close-output-port convs-out) (close-output-port convs-out)
;(custodian-shutdown-all main-client-cust)
(exit))) (exit)))
(displayln (string-append date-print username ": " input) out) (displayln (string-append date-print username ": " input) out)