summaryrefslogtreecommitdiff
path: root/src/site.clj
diff options
context:
space:
mode:
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))