summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorsostler <sbostler@gmail.com>2010-01-06 02:02:01 -0500
committersostler <sbostler@gmail.com>2010-01-06 02:02:01 -0500
commita164617625e65b2d949358d6bb897c5b14713362 (patch)
treeaf9431aa47f064f9ec4c926ed353cc3eeff865dd /src
parentf73640c51513fa9164edcd25493ef0fdb75b7d18 (diff)
Updated logout
Diffstat (limited to 'src')
-rwxr-xr-xsrc/site.clj13
1 files changed, 7 insertions, 6 deletions
diff --git a/src/site.clj b/src/site.clj
index 3030df9..65d4d11 100755
--- a/src/site.clj
+++ b/src/site.clj
@@ -219,7 +219,7 @@
(resp-error "BAD_LOGIN"))))
(defn logout [session]
- [(session-dissoc :nick :user_id)
+ [(session-dissoc :nick :user_id :is_admin :avatar)
(redirect-to "/")])
;; Registration
@@ -319,7 +319,7 @@
(defn validated-chat [session room-key]
(let [room (@rooms room-key)]
(if (and room
- (or (not (room :admin-only)) (session :is_admin)))
+ (or (not (room :admin_only)) (session :is_admin)))
(chat session room)
(resp-error "UNKNOWN_ROOM"))))
@@ -343,7 +343,7 @@
(let [room-key (params :room)
room (@rooms room-key)]
(if (and room
- (or (not (room :admin-only)) (session :is_admin)))
+ (or (not (room :admin_only)) (session :is_admin)))
(refresh session params room)
(resp-error "UNKNOWN_ROOM"))))
@@ -391,7 +391,7 @@
(let [room-key (params :room)
room (@rooms room-key)]
(if (and room
- (or (not (room :admin-only)) (session :is_admin)))
+ (or (not (room :admin_only)) (session :is_admin)))
(msg session params)
(resp-error "UNKNOWN_ROOM"))))
@@ -423,8 +423,9 @@
;; Upload
+; TODO
(defn upload [session params]
- "TODO")
+ nil)
;; Compojure Routes
@@ -471,7 +472,7 @@
(dosync
(doseq [room-db (fetch-rooms)]
(alter rooms assoc (room-db :key)
- {:admin-only (room-db :admin_only)
+ {:admin_only (room-db :admin_only)
:room_id (room-db :room_id)
:key (room-db :key)
:name (room-db :name)