 (require 'cl)
 (require 'json)
 (require 'url)
+
+(setq floobits-plugin-dir (file-name-directory load-file-name))
+(add-to-list 'load-path floobits-plugin-dir)
 (require 'highlight)
 
 (setq floobits-agent-version "0.01")

  (setq floobits-conn (open-network-stream "floobits" nil floobits-agent-host floobits-agent-port))
  (set-process-coding-system floobits-conn 'utf-8 'utf-8)
  (set-process-filter floobits-conn 'floobits-listener)
  (floobits-add-hooks)
  (floobits-auth))

(defun floobits-destroy-connection ()

         (ranges-length (- (length ranges) 1))
         (buffer (get-file-buffer (floo-get-item req 'full_path)))
         (user_id (floo-get-item req 'user_id)))
  (floobits-apply-highlight user_id buffer ranges)
  (when floobits-follow-mode
    (switch-to-buffer buffer)
    (goto-char (+ 1 (elt (elt ranges ranges-length) 0))))))
