anchor.diff:  ;;;;------------------------------------------------
   
   (defparameter *tg-loop* nil)
  +(defparameter *irc-watcher* nil)
   
   (defun bot-start ()
     (irc-reconnect)
  +  (setf *irc-watcher*
  +        (sb-thread:make-thread
  +         (lambda ()
  +           (loop
  +              (sleep 60)
  +              (irc-check-connection)))))
     (setf *tg-loop* (sb-thread:make-thread #'tg-getupdate-loop)))
   
   (defun bot-halt ()
     (tryto (sb-thread:terminate-thread *tg-loop*))
  +  (tryto (sb-thread:terminate-thread *irc-watcher*))
     (tryto (irc-shutdown)))
   
  
positive.code:           (bot-halt)
            (error "BOT HALT!"))
          (progn
            (tryto (remove-all-hooks *irc-connection*)
                   (quit *irc-connection*))
            (sleep 5)
            (setf *irc-connection*
                  (connect :nickname "MidyMidyTGBot"
  
negative.code:                     (lambda (msg)
                        (funcall *tg-message-sender*
                                 (msgstr-irc->tg msg))))
            (add-hook *irc-connection*
                      'irc::irc-pong-message
                      (lambda (msg)
                        (setf *pong* (received-time msg))))
            (start-background-message-handler *irc-connection*)
            (if callback
                (funcall callback)))))
  