     (unless (bolp) (newline)))
   ;; concatenate all messages (one per line) and deal with them one at a time
   (emdocs-set-cur-msg client (concat (emdocs-get-cur-msg client) msg))
-  (with-current-buffer (emdocs-get-client-process-buffer
-                        (emdocs-get-attached-buffer client))
-    (if (emdocs-extract-line (emdocs-get-cur-msg client))
-        (insert "HELL")
-      (insert "YA")))
   (loop with str-pair = (emdocs-extract-line (emdocs-get-cur-msg client))
         while str-pair
         do (progn
              (emdocs-set-cur-msg client (cdr str-pair))
-             (with-current-buffer (emdocs-get-client-process-buffer
-                                   (emdocs-get-attached-buffer client))
-               (insert "MODDED:" (car str-pair) "," (cdr str-pair)))
              (emdocs-client-filter-parse client sock (car str-pair))
              (setq str-pair
                    (emdocs-extract-line (emdocs-get-cur-msg client))))))

                  (equal (emdocs-get-process client) sock))
                *emdocs-incoming-clients*)))))

(defun emdocs-server-filter (sock msg)
  "docstring"
  ;; assumes will only receive json from emdocs-client-filter

         (ip (plist-get json-msg :ip)))
    (unless (find ip *emdocs-incoming-clients*
                  :test #'emdocs-is-ip-from-client)
      (let ((client (make-instance 'emdocs-client
                                  :process sock
                                  :attached-buffer buffer
                                  :ip ip)))
        (add-to-list '*emdocs-incoming-clients* client)
        (emdocs-send-file-periodically client sock msg))
      (unless (find ip *emdocs-outgoing-clients*
                    :test #'emdocs-is-ip-from-client)
        (emdocs-connect-client buffer ip))
