summaryrefslogtreecommitdiff
path: root/src/utils.clj
diff options
context:
space:
mode:
Diffstat (limited to 'src/utils.clj')
-rwxr-xr-xsrc/utils.clj7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/utils.clj b/src/utils.clj
index 08b06ab..1a9e09e 100755
--- a/src/utils.clj
+++ b/src/utils.clj
@@ -426,10 +426,13 @@
(defn is-super-vip? [session]
(contains? super-vips (:nick session)))
-(defmacro if-vip [e]
+(defmacro if-vip
"Evaluates expr if user is super-vip otherwise returns 404. Can only be used
where session is defined."
- `(if (is-vip? ~'session) ~e (unknown-page)))
+ ([e]
+ `(if (is-vip? ~'session) ~e (unknown-page)))
+ ([e alt]
+ `(if (is-vip? ~'session) ~e ~alt)))
(defmacro if-super-vip [e]
"Evaluates expr if user is super-vip otherwise returns 404. Can only be used