anchor.diff:  ;;;
   (defparameter *server-listen-ip* iolib:+ipv4-unspecified+)
   (defparameter *server-port* 4000)
  +(defparameter *default-client-main* nil)
   
   ;;;
   ;;; TCP Clients
   ;;;
   (defclass tcp-client (client fundamental-character-output-stream
                                fundamental-character-input-stream)
  -  ((input-handler :initarg :input-handler :initform nil :accessor input-handler)
  +  (#+nil(input-handler :initarg :input-handler :initform nil :accessor input-handler)
      (socket :accessor socket :initarg :socket
              :initform (error "Must provide a socket for this client."))
      (remote-name :accessor remote-name)
  
positive.code: 
  (defmethod init ((client tcp-client))
    (format client "~&Hello. Welcome to Sykosomatic.~%")
    (login client))
  
  (defmethod update ((client tcp-client))
    nil)
  
  (defmethod teardown ((client tcp-client))
    (close client :abort t)
  
negative.code:   (string= (password-hash account)
             (hash-password input)))
  
  (defun/cc maybe-login (client)
    (let* ((username (prompt-client client "~&Username: "))
           (account (find-account username)))
      (if account
          (login client account)
          (no-such-account client username))))
  
  (defun/cc login (client account)
    (let ((account (confirm-password account (prompt-client client "~&Password: "))))
      (if account
          (progn
            (setf (soul client) (make-instance 'soul :account account :client client))
            #+nil(format client "~&You are now logged in as ~A.~%" (username (account (soul client))))
            (format client "~&Commands: 'look' and 'quit'. Type anything else to chat.~%")
            #+nil(broadcast-to-room client "~&~A enters the world.~%" (username (account (soul client)))))
          (progn
            (format client "~&Wrong password.~%")
            (maybe-login client)))))
  
  (defun/cc no-such-account (client username)
    (if (client-y-or-n-p client "~&No such account. Create one? (Y/n) ")
        (create-account client username)
        (progn
          #+nil(format client "~&Bye!~%")
          (close client))))
  
  (defun/cc create-account (client username)
    (let* ((username (pick-username client username))
           (password (pick-password client))
           (email (pick-email client)))
      (make-instance 'account :username username :password password :email email)
      (format client "~&Account successfully created~%")
      (maybe-login client)))
  
  (defun/cc pick-username (client username)
    (if (client-y-or-n-p client "~&Use ~A as your username? (Y/n) " username)
        username
        (pick-username client (prompt-client client "~&Pick a new username: "))))
  
  (defun/cc pick-password (client)
    (let* ((password (prompt-client client "~&Pick a password: "))
           (confirm (prompt-client client "~&Confirm your password: ")))
      (if (string= password confirm)
          password
          (progn
            (format client "~&Passwords did not match.~%")
            (maybe-login client)))))
  
  (defun/cc pick-email (client)
    (prompt-client client "~&Please enter your email address: "))
  
  (defun play-game (client)
    (handle-player-command (soul client) (last-input client)))
  
  (setf *default-client-main* #'play-game)
  