anchor.diff:  ;;         Just set it back to zero if it comes back null?
   ;;         Or might that result in problems if the network is unavailable? Yes.
   
  +
   ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
   ;; Package
   ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
   
   (in-package #:microblog-bot)
  +
  +
  +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  +;; Useful constants
  +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  +
  +(defconstant %one-hour (* 60 60)
  +  "One hour in seconds")
  +(defconstant %one-day (* %one-hour 24)
  +  "One day in seconds")
  +
  +(defconstant %min-wait-live (* 60 60 1)
  +  "The default minimum time in seconds between posts used by live bots")
  +(defconstant %max-wait-live (* 60 60 4)
  +  "The default maximum time between posts used by live bots")
  +(defconstant %sleep-time-live (* 60 60 1)
  +  "The sleep time used by live bots")
  +
  +(defconstant %min-wait-debug 2
  +  "The default minimum time in seconds between posts used by test bots")
  +(defconstant %max-wait-debug 4
  +  "The default maximum time in seconds between posts used by test bots")
  +(defconstant %sleep-time-debug 1
  +  "The sleep time used by debug bots")
  +
  +(defvar %bot-sleep-time-debug 1
  +  "How long to wait between each check when debugging")
  +
  +(defvar %bot-sleep-time-live (* 60 5)
  +  "How long to wait between each check when live")
  +
  +(defvar *min-wait-time* %min-wait-live
  +  "The default minimum time in seconds between posts used by bots")
  +
  +(defvar *max-wait-time* %max-wait-live
  +  "The default maximum time in seconds between posts used by bots")
  +
  +(defvar *bot-sleep-time* %bot-sleep-time-live
  +  "How long to wait between each check")
  +
  +
  +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  +;; Error handling and testing
  +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  +
  +(defvar *live* t)
  +
  +(defun time-string ()
  +  (multiple-value-bind (second minute hour date month year)
  +      (get-decoded-time)
  +    (format nil "~a-~a-~a ~a:~a:~a" year month date hour minute second)))
  +
  +(defun post-live (message)
  +  (cl-twit:update message))
  +
  +(defun post-debug (message)
  +  (format t "~a - ~a~%" (time-string) message))
  +
  +(defun debug-msg-live (&rest args)
  +  "Ignore"
  +  nil)
  +
  +(defun debug-msg-debug (&rest args)
  +  "Format the message to stdout"
  +  (apply #'format t (concatenate 'string "~a - " (car args) "~%") 
  +	 (time-string) (cdr args)))
  +
  +(defun set-debug ()
  +  (setf *live* nil)
  +  (setf *min-wait-time* %min-wait-debug)
  +  (setf *max-wait-time* %max-wait-debug)
  +  (setf *bot-sleep-time* %bot-sleep-time-debug)
  +  (setf (symbol-function 'post) #'post-debug)
  +  (setf (symbol-function 'debug-msg) #'debug-msg-debug))
  +
  +(defun set-live ()
  +  (setf *live* t)
  +  (setf *min-wait-time* %min-wait-live)
  +  (setf *max-wait-time* %max-wait-live)
  +  (setf *bot-sleep-time* %bot-sleep-time-live)
  +  (setf (symbol-function 'post) #'post-live)
  +  (setf (symbol-function 'debug-msg) #'debug-msg-debug))
  +
  +(eval-when (:compile-toplevel :execute :load-toplevel)
  +  (set-live))
  +
  +(defun report-error (&rest args)
  +  (apply #'format t args))
  +
   
   ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
   ;; Users
  
positive.code: 		 :initform 0)
     (min-wait :accessor min-wait 
  	     :initarg :min-wait
  	     :initform (* 60 60 1))
     (max-wait :accessor max-wait 
  	     :initarg :max-wait 
  	     :initform (* 60 60 4))
     (daily-task-hour :accessor daily-task-hour
  		    :initarg :daily-task-hour 
  		    :initform 0)   
  
negative.code: 			   (cl-twit:status-user mention))
  			 (ignore-messages-from bot)
  			 :test #'string=))
  	  (handler-case
  	      (if (search "!source" (cl-twit:status-text mention))
  		  (respond-to-source-request bot mention)
  		  (respond-to-mention bot mention))
  	    (error (err) 
  	      (report-error "~a - ~a~%" bot err))))))))
  
  (defmethod daily-task ((bot microblog-bot))
    "Performed every day at midnight."
  