 (add-hook 'after-change-functions 'after-change nil t)
 (add-hook 'find-file-hook 'after-new-buffer nil t)
 
-(create-connection)+(create-connection)


(defun floobits-filter-func (condp lst)
  (delq nil
	(mapcar (lambda (x) (and (funcall condp x) x)) lst)))

(defun _floobits-is-buffer-public(buf)
  (let ((name (buffer-name buf)))
    (cond  
     ((string="*" (substring name 0 1)) nil)
     ((string=" " (substring name 0 1)) nil)
     ((< (length name) 11) t)

      (floobits-switch (substring floobits-agent-buffer 0 position))
      (setq floobits-agent-buffer
      (substring floobits-agent-buffer
        (if (> (length floobits-agent-buffer) position) (+ 1 position) position)))
      (floobits-listener process "")))))

(defun floobits-auth()
  (let ((req (list
    (cons 'username floobits-username)
    (cons 'room floobits-room)
    (cons 'secret floobits-secret)
    (cons 'room_owner floobits-room-owner))))
    (send-to-agent req 'auth)))

(defun create-connection()
