summaryrefslogtreecommitdiff
path: root/src/admin.clj
diff options
context:
space:
mode:
authorsostler <sbostler@gmail.com>2010-04-14 07:04:20 -0400
committersostler <sbostler@gmail.com>2010-04-14 07:04:20 -0400
commitb79243c7d06987672cffea75695e1036911dac13 (patch)
tree483f6b710c0b00803ef5d9ea943dd65b6d038b17 /src/admin.clj
parentbf2f16d125d1905dc5867d371a0324ee09984494 (diff)
Mute file uploads
Diffstat (limited to 'src/admin.clj')
-rw-r--r--src/admin.clj11
1 files changed, 8 insertions, 3 deletions
diff --git a/src/admin.clj b/src/admin.clj
index 7bde945..0253734 100644
--- a/src/admin.clj
+++ b/src/admin.clj
@@ -50,9 +50,9 @@
(def *mute-refresh-period-sec* 60)
(def fetch-mutes-query "
-SELECT mutes.*, ((set_on + duration)) AS expiry
-FROM mutes
-WHERE (set_on + duration) > now()
+SELECT mutes.*, (set_on + duration) AS expiry
+FROM mutes
+WHERE (set_on + duration) > now()
AND NOT is_canceled
")
@@ -91,3 +91,8 @@ AND NOT is_canceled
user-id admin-id duration reason)]
(and (do-cmds q) "OK"))))))
+
+(defn format-mute [mute]
+ (format (str "I'm sorry, you've been muted for %s. "
+ "You'll be able to post again on %s EST.")
+ (mute :reason) (mute :expiry)))