            (java.text SimpleDateFormat)))
 
 (defn- format-date []
-  (.format (SimpleDateFormat. "yyyy-MM-dd") (Date.)))
+  (.format (SimpleDateFormat. (config :catchup :date-format)) (Date.)))
 
 (defn- format-time []
-  (.format (SimpleDateFormat. "HH:mm:ss") (Date.)))
+  (.format (SimpleDateFormat. (config :catchup :time-format)) (Date.)))
 
 (def msg-db-agent (agent {}))
-
-(def max-msgs-per-room 10)
 
 (defn- add-msg-fn [msg]
   (fn update-msg-agent [db]

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