summaryrefslogtreecommitdiff
path: root/src/utils.clj
diff options
context:
space:
mode:
Diffstat (limited to 'src/utils.clj')
-rwxr-xr-xsrc/utils.clj10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/utils.clj b/src/utils.clj
index 607343e..4a3343f 100755
--- a/src/utils.clj
+++ b/src/utils.clj
@@ -294,7 +294,17 @@
(defn is-vip? [session]
(session :is_admin))
+(def super-vips #{"timb" "scottbot" "ryder"})
+
+(defn is-super-vip? [session]
+ (contains? super-vips (:nick session)))
+
(defmacro if-vip [e]
"Evaluates expr if user is vip otherwise returns 404. Can only be used
where session is defined."
`(if (is-vip? ~'session) ~e (unknown-page)))
+
+(defmacro if-super-vip [e]
+ "Evaluates expr if user is vip otherwise returns 404. Can only be used
+ where session is defined."
+ `(if (is-super-vip? ~'session) ~e (unknown-page)))