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

                                 (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})))


           (java.text SimpleDateFormat)))

(defn- format-date []
  (.format (SimpleDateFormat. (config :catchup :date-format)) (Date.)))

(defn- format-time []
  (.format (SimpleDateFormat. (config :catchup :time-format)) (Date.)))

(def msg-db-agent (agent {}))

(defn- add-msg-fn [msg]
  (fn update-msg-agent [db]
