diff options
| author | Scott Ostler <scottbot9000@gmail.com> | 2010-11-02 19:35:32 -0400 |
|---|---|---|
| committer | Scott Ostler <scottbot9000@gmail.com> | 2010-11-02 19:35:32 -0400 |
| commit | 73443969b5e98713e1bd36b0b524f60b77a0ad53 (patch) | |
| tree | 3ec4e4e805b92548d8bfd2027d272b8750585e71 /src/utils.clj | |
| parent | d06abd23fae1429499e7480f276815a17b33e125 (diff) | |
Disable room log for non-vips
Diffstat (limited to 'src/utils.clj')
| -rwxr-xr-x | src/utils.clj | 7 |
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 |
