summaryrefslogtreecommitdiff
path: root/src/rooms.clj
diff options
context:
space:
mode:
Diffstat (limited to 'src/rooms.clj')
-rw-r--r--src/rooms.clj23
1 files changed, 13 insertions, 10 deletions
diff --git a/src/rooms.clj b/src/rooms.clj
index 4f7d6c4..e919557 100644
--- a/src/rooms.clj
+++ b/src/rooms.clj
@@ -1,6 +1,7 @@
(ns rooms
(:import java.util.Date)
(:use clojure.contrib.str-utils
+ clojure.contrib.def
utils
user))
@@ -68,15 +69,18 @@
(do-select [query room-id *dumps-per-page* offset]))))
(defn build-room-map-from-db [room-db]
- {:admin_only (room-db :admin_only)
- :room_id (room-db :room_id)
- :key (room-db :key)
- :name (room-db :name)
- :description (room-db :description)
- :history_size (room-db :history_size)
- :users (ref {})
- :messages (ref (fetch-messages-by-room (room-db :room_id) false))
- :topic (ref nil)
+ {:admin_only (room-db :admin_only)
+ :room_id (room-db :room_id)
+ :key (room-db :key)
+ :name (room-db :name)
+ :description (room-db :description)
+ :max_file_size (room-db :max_file_size)
+ :max_image_width (room-db :max_image_width)
+ :max_image_height (room-db :max_image_height)
+ :history_size (room-db :history_size)
+ :users (ref {})
+ :messages (ref (fetch-messages-by-room (room-db :room_id) false))
+ :topic (ref nil)
})
@@ -97,7 +101,6 @@
(defn build-msg [nick content msg-id]
(struct message-struct nick content (new Date) msg-id))
-
(def message-count-limit 200)
(defn add-message [msg room]