                                  (conj text))))))))
 
 (defn add-msg [room-name msg]
-  (println :adding msg :to room-name)
   (send msg-db-agent
         (add-msg-fn {:room room-name :msg msg})))
 

(add-hook ::catchup 'nick-hook catchup-log)
(add-hook ::catchup 'topic-hook catchup-log)

(defcommand catchup [channel room]
  (println :catchup room)
  (if room
    (println :msgs (messages-for room))
    (raise {:type :client-error
            :code 999
            :msg ":No room given"})))

        ;; have the room already
        (do
          (swap! (db room) (fn update-msg-atom [q]
                             (conj (if (>= (count q)
                                           (config :catchup :max-msgs-per-room))
                                     (pop q)
                                     q)
                                   text)))
