anchor.diff:    (token-request "/logout/" NIL)
     (setf *token* NIL *cookies* NIL))
   
  -(defun get-user-id (user)
  -  "Retrieve the actual ID of a user."
  -  ; TODO
  -  )
  +(defun get-user (username)
  +  ;; We save a page load by using that getting the user-id also gets us the profile page.
  +  ;; Yay for hacks.
  +  (let ((id (get-user-id username)))
  +    (make-instance 'user :id id :title username
  +                   :last-activity 
  +                   :register-date 
  +                   :follow-count 
  +                   :trophy-count 
  +                   :message-count 
  +                   :like-count )))
  +
  +(defgeneric get-user-id (user) (:documentation "Retrieve the ID of a user from their title."))
  +
  +(defmethod get-user-id ((user user))
  +  (get-user-id (title user)))
  +
  +(defmethod get-user-id ((user string))
  +  (checked-request "/members/" `(("username" . ,user)))
  +  (let ((id ($ ".crumb" (last) (attr :href) (node))))
  +    (subseq id (1+ (search "/" id :from-end T :end2 (1- (length id)))) (search "/" id :from-end T))))
   
   (defmethod start-thread ((user user) message &key)
     "Start a new thread on the profile page of a user."
  
positive.code: (in-package :org.tymoonnext.ed-bot.xencl)
  
  (defclass user (meta-forum)
    ((pass :initarg :pass :reader pass))
    (:documentation "Standard user object for user related interactions."))
  
  (defclass profile-thread (meta-thread)
  
negative.code: (defmethod reply ((post profile-post) message &key)
    "Reply to a post on a user-profile thread."
    (post (thread post) (format NIL "@~a: ~a" (author post) message)))
  
  (defun get-users (&key (start 0) (num 40) (order-by :USERNAME) (order-direction :ASC))
    "Get a list of users. Sorting requires this http://raid101.com/community/forums/xenforo-development.114/ plugin to be installed.
  Order-by can be one of (:USERNAME :REGISTER-DATE :MESSAGE-COUNT :LIKE-COUNT :TROPHY-POINTS :FOLLOW-COUNT :LAST-ACTIVITY)
  Order-direction can be one of (:ASC :DESC)"
    (flet ((make-user (node)
             (let ((infos ($ node ".userStats dd"))
                   (username ($ node "h3.username")))
               (make-instance 'user 
                              :id (let ((id ($ username "a" (attr :href) (node))))
                                    (subseq id (1+ (search "/" id)) (search "/" id :from-end T)))
                              :title ($ username "span" (text) (node))
                              :follow-count (parse-post-integer ($ infos (eq 3) (text) (node)))
                              :trophy-count (parse-post-integer ($ infos (eq 2) (text) (node)))
                              :message-count (parse-post-integer ($ infos (eq 0) (text) (node)))
                              :like-count (parse-post-integer ($ infos (eq 1) (text) (node)))))))
      (checked-request "/members/" `(("sort" . ,(cl-ppcre:regex-replace "-" (string-downcase order-by) "_"))
                                     ("dir" . ,(string-upcase order-direction))))
      (crawl-nodes ".memberList>li" #'make-user :start start :num num)))
  