anchor.diff:      (setf output (string-trim '(#\Space #\Tab #\Return #\Linefeed) output))
       (v:trace :markov "Generated string: ~a" output)
       (if (> (length (split-sequence:split-sequence #\Space output)) 0) output)))
  -
  
positive.code: 
  (define-command (markov activate) (&optional channel server) (:authorization T :documentation "Activate markov learning and spouting for a channel." :modulevar markov)
    (let ((name (format NIL "~a/~a" (or server (name (server event))) (or channel (channel event)))))
      (pushnew name (active-in markov) :test #'string-equal)
      (respond event "Learning/Spouting now activated on ~a." name)))
  
  (define-command (markov deactivate) (&optional channel server) (:authorization T :documentation "Deactivate markov learning and spouting for a channel." :modulevar markov)
    (let ((name (format NIL "~a/~a" (or server (name (server event))) (or channel (channel event)))))
      (setf (active-in markov)
            (delete name (active-in markov) :test #'string-equal))
      (respond event "No longer learning/spouting on ~a." name)))
  
  (define-command (markov probability) (&optional new-value) (:authorization T :documentation "Set or view the probability of invoking markov." :modulevar markov)
    (when new-value
      (setf (probability markov) (parse-integer new-value :junk-allowed T)))
    (respond event "Probability: ~a" (probability markov)))
  
  (define-command (markov say) (&optional arg1 arg2) (:documentation "Let the bot say something." :modulevar markov)
    (if (and arg1 (not arg2)) (setf arg2 arg1 arg1 "!NONWORD!"))
  
negative.code:   (:use :cl :colleen :events :alexandria))
  (in-package :org.tymoonnext.colleen.mod.markov)
  
  (defvar *registry-file* (merge-pathnames "markov.registry.uc.lisp" (merge-pathnames "config/" (asdf:system-source-directory :colleen))))
  
  (define-module markov ()
    ((%registry :initarg :registry :initform (make-hash-table :test 'equal) :accessor registry))
    (:documentation "Simple markov chain module."))
  
  (defmethod start ((markov markov))
    (let ((uc:*config*))
      (uc:load-configuration *registry-file*)
      (setf (registry markov) uc:*config*))
    markov)
  
  (defmethod stop ((markov markov))
    (uc:save-configuration *registry-file* :object (registry markov)))
  
  (define-handler (privmsg-event event) (:modulevar markov)
    (when (and (char= (aref (channel event) 0) #\#)
               (find (format NIL "~a/~a" (name (server event)) (channel event)) (uc:config-tree :active-in) :test #'string-equal))
      (unless (char= (aref (message event) 0) #\!)
        (learn markov (message event)))
  
      (when (< (random 100) (uc:config-tree :probability))
        (let ((wordlist (split-sequence:split-sequence #\Space (message event) :remove-empty-subseqs T)))
          (when (cdr wordlist)
            (let ((response (generate-string markov (first wordlist) (second wordlist))))
  