room level messages, client disconnection
[mudsync.git] / mudsync / networking.scm
index fe641cc9a227556ee945a8fc58b18a5f3b052ea3..8c5955dd39c44b2325278573bf288ea638a31246 100644 (file)
   "Handle a closed port"
   (format #t "DEBUG: handled closed port ~x\n" client-id)
   (8sync-port-remove client)
-  (hash-remove! (nm-clients nm) client-id))
+  (hash-remove! (nm-clients nm) client-id)
+  (<- nm (nm-send-input-to nm) 'client-closed #:client client-id))
 
 (define-method (nm-handle-port-eof nm client client-id)
   "Handle seeing an EOF on port"
   (format #t "DEBUG: handled eof-object on port ~x\n" client-id)
   (close client)
   (8sync-port-remove client)
-  (hash-remove! (nm-clients nm) client-id))
+  (hash-remove! (nm-clients nm) client-id)
+  (<- nm (nm-send-input-to nm) 'client-closed #:client client-id))
 
 (define-method (nm-handle-line nm client client-id line)
   "Handle an incoming line of input from a client"