anchor.diff:  	(if cached
   		cached
   		(let ((result (query (:select '*
  -                                 :from 'accounts
  -                                 :where (:= (:lower 'name) canonical-name))
  -                                :alist))
  -              (retrieved (make-instance 'account)))
  -          (loop for (field value) in retrieved
  -               do (setf (slot-value account field) value))
  -		  (cond
  -			(retrieved
  -			 (setf (gethash (name-of retrieved) *account-name-cache*)
  -				   retrieved)
  -			 (setf (gethash (idnum-of retrieved) *account-idnum-cache*)
  -				   retrieved)
  -			 (setf (players-of retrieved)
  -				   (sort (players-of retrieved)
  -						 #'<
  -						 :key #'idnum-of))
  -			 retrieved)
  -			(t
  -			 nil))))))
  +                              :from 'accounts
  +                              :where (:= (:lower 'name) canonical-name))
  +                             :alist))
  +              (account (make-instance 'account)))
  +		  (when result
  +            (loop for tuple in result
  +               do (setf (slot-value account (intern (symbol-name (car tuple)))) (cdr tuple)))
  +            (setf (gethash canonical-name *account-name-cache*) account)
  +            (setf (gethash (idnum-of account) *account-idnum-cache*) account)
  +            (setf (players-of account)
  +                  (mapcar (lambda (info)
  +                            (make-instance 'player-record
  +                                           :idnum (cdr (assoc :idnum info))
  +                                           :account (idnum-of account)
  +                                           :name (cdr (assoc :name info))
  +                                           :birth-time (if (eql (cdr (assoc :birth-time info)) :null) (now) (cdr (assoc :birth-time info)))
  +                                           :login-time (if (eql (cdr (assoc :login-time info)) :null) (now) (cdr (assoc :login-time info)))))
  +                           (query (:order-by (:select 'idnum 'name 'birth-time 'login-time :from 'players :where (:= 'account 2)) 'idnum) :alists)))
  +            account)))))
   
   (defun save-account (account)
     "Saves the account information into the database."
  
positive.code: 		(crypt-password password (random-salt))))
  
  (defun account-boot ()
    (slog "Getting max account idnum")
    (setf *account-max-idnum* (max-account-id))
  
  
negative.code: 
  (defun crypt-password (password salt)
    "Encrypt a password with a hash"
    (uffi:with-cstring (password-cstring (coerce password 'simple-string))
      (uffi:with-cstring (salt-cstring (coerce salt 'simple-string))
        (uffi:convert-from-cstring 
         (crypt password-cstring salt-cstring)))))
  
  