summaryrefslogtreecommitdiff
path: root/src/site.clj
diff options
context:
space:
mode:
authorScott Ostler <scottbot9000@gmail.com>2010-10-25 10:11:02 -0400
committerScott Ostler <scottbot9000@gmail.com>2010-10-25 10:11:02 -0400
commita77897fd4a474e5e2cfa292af069c33f8d3aa6ac (patch)
tree1064423354804da04363dc9fffe93f89cf37a684 /src/site.clj
parentf4bdb335fb3bdae6cd82315917ebacfb939b665a (diff)
Added mgmt pw
Diffstat (limited to 'src/site.clj')
-rw-r--r--src/site.clj12
1 files changed, 11 insertions, 1 deletions
diff --git a/src/site.clj b/src/site.clj
index 1523c6f..68190d5 100644
--- a/src/site.clj
+++ b/src/site.clj
@@ -1253,6 +1253,15 @@ WHERE u.user_id = ANY(?)"
(.setAttribute st "dumps" (map process-message-for-output msgs))
(.toString st)))
+;; MGMT logic
+
+(def mgmt-pw "idontgetit")
+
+(defn mgmt [session url pw]
+ (if (= (and pw (lower-case pw)) mgmt-pw)
+ (validated-chat session "mgmt" "chat")
+ (validated-chat session "mgmt")))
+
;; Compojure Routes
(defn serve-static [dir path]
@@ -1335,7 +1344,8 @@ WHERE u.user_id = ANY(?)"
(GET "/test/hiscores/week" (hiscore-test session params "week"))
(GET "/test/hiscores/month" (hiscore-test session params "month"))
-
+ (GET "/mgmt" (mgmt session request nil))
+ (GET "/mgmt/:pw" (mgmt session request (:pw params)))
;; Events
; (GET "/event" (event-page session))