anchor.diff:                                     :start total-readed))
          (decf readed total-readed)
          (incf total-readed readed)
  +       (when (< readed buff-size)
  +         (setf (fill-pointer buffer) total-readed))
          (setf result (funcall condition buffer))
          (when result
  -         (setf (fill-pointer buffer) readed)
  +         (when result-only
  +           (return result))
            (return (values result buffer total-readed)))
          (when (< readed buff-size)
  -         (setf (fill-pointer buffer) readed)
  +         (when result-only
  +           (return result))
            (return (values nil buffer total-readed)))
          (adjust-array buffer
                        (+ (array-total-size buffer) buff-size)
                        :fill-pointer t))))
   
  +(defun get-http-page-title (url)
  +  (multiple-value-bind (stream status headers) (drakma:http-request url :want-stream t)
  +    (unwind-protect
  +         (when (and (= status 200) (search "text/html" (cdr (assoc :content-type headers))))
  +           (read-until stream #'(lambda (data)
  +                                  (ppcre:register-groups-bind
  +                                      (title)
  +                                      ("(?i)<title>([^<]*)</title>" data :sharedp t)
  +                                    title))
  +                       :result-only t))
  +      (close stream))))
  +
   (defun process-common (connection message)
     (optima:match (xmpp:body message)
       ((optima.ppcre:ppcre "(http[s]?://[\\S]+)" url)
  -     (multiple-value-bind (stream status headers) (drakma:http-request url :want-stream t)
  -       (unwind-protect
  -            (when (and (= status 200) (search "text/html" (cdr (assoc :content-type headers))))
  -              (let ((match (read-until stream #'(lambda (data)
  -                                                  (ppcre:register-groups-bind
  -                                                      (title)
  -                                                      ("(?i)<title>([^<]*)</title>" data :sharedp t)
  -                                                    title)))))
  -                (when match
  -                  (reply-chat connection (xmpp:from message)
  -                              match (xmpp::type- message)))))
  -         (close stream))))))
  +     (let ((title (get-http-page-title url)))
  +       (when title
  +         (reply-chat connection (xmpp:from message)
  +                     title (xmpp::type- message)))))))
   
   (defun reply-chat (connection to reply kind)
     (if (string-equal kind "groupchat")
  
positive.code: (defun kill-thread (thread)
    (when (bordeaux-threads:threadp thread)
      (bordeaux-threads:destroy-thread thread)))
  
negative.code:           (process-personal connection message))
          (process-common connection message))))
  
  (defparameter *errors* nil)
  
  (defclass user-error ()
    ((object
      :accessor object
      :initarg :object)
     (catched-at
      :accessor catched-at
      :initarg :catched-at
      :initform (get-universal-time))))
  
  (defun make-user-error (obj)
    (make-instance 'user-error :object obj))
  
  (defmethod print-object ((object user-error) stream)
    (print-unreadable-object (object stream :type nil :identity nil)
      (format stream "error ~A at ~A" (object object)
              (format-time (catched-at object)))))
  
  (defun format-time (time)
    (multiple-value-bind
          (second minute hour date month year day-of-week dst-p tz)
        (decode-universal-time time)
      (declare (ignore second day-of-week dst-p tz))
      (format nil "~a-~a-~a ~a:~a" date month year hour minute)))
  
  (defun callback-with-restart (&rest args)
    (restart-case
        (handler-case (apply #'xmpp::default-stanza-callback args)
          (t (err) (push (make-user-error err) *errors*)))
      (skip-stanza () '(ignored))))
  
  (defun read-until (stream condition &key (buff-size 1024) result-only)
    (let ((buffer (make-array buff-size :adjustable t :fill-pointer t))
          (readed 0)
          (total-readed 0)
  