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