 destructors fry io io.encodings.utf8 kernel managed-server
 namespaces parser sequences sorting splitting strings.parser
 unicode.case unicode.categories calendar calendar.format
-locals multiline ;
+locals multiline io.encodings.binary io.encodings.string
+prettyprint ;
 IN: managed-server.chat
 
 TUPLE: chat-server < managed-server ;

        [ "Unknown command: " prepend print flush ] if
    ] if-empty ;

:: add-command ( quot docs key -- )
    quot key commands get set-at
    docs key chat-docs get set-at ;

    ] "" append-outputs-as send-everyone ;

M: chat-server handle-already-logged-in
    username username-taken-string print flush ;

M: chat-server handle-managed-client*
    readln dup f = [ t client (>>quit?) ] when
