From 3f2890d6c3527cf7a32ee596cd7e39f19068ff53 Mon Sep 17 00:00:00 2001 From: Aevann Date: Tue, 16 Apr 2024 23:36:00 +0200 Subject: [PATCH] shorter award names --- files/helpers/config/awards.py | 8 ++++---- files/routes/admin.py | 2 +- files/routes/awards.py | 2 +- files/templates/userpage/admintools.html | 2 +- 4 files changed, 7 insertions(+), 7 deletions(-) diff --git a/files/helpers/config/awards.py b/files/helpers/config/awards.py index f607a8a42..eddccb58b 100644 --- a/files/helpers/config/awards.py +++ b/files/helpers/config/awards.py @@ -579,7 +579,7 @@ AWARDS = { }, "flairlock": { "kind": "flairlock", - "title": "1-Day Flairlock", + "title": "Flairlock", "description": "Sets a flair for the recipient and locks it for 24 hours.", "icon": "fas fa-lock", "color": "text-black", @@ -607,7 +607,7 @@ AWARDS = { }, "namelock": { "kind": "namelock", - "title": "1-Day Namelock", + "title": "Namelock", "description": "Changes the recipient's username to something of your choosing for 24 hours.", "icon": "fas fa-at", "color": "text-pink", @@ -747,7 +747,7 @@ AWARDS = { }, "ban": { "kind": "ban", - "title": "1-Day Ban", + "title": "Ban", "description": "Bans the recipient for a day.", "icon": "fas fa-gavel", "color": "text-danger", @@ -761,7 +761,7 @@ AWARDS = { }, "unban": { "kind": "unban", - "title": "1-Day Unban", + "title": "Unban", "description": "Removes 1 day from the ban duration of the recipient.", "icon": "fas fa-gavel", "color": "text-success", diff --git a/files/routes/admin.py b/files/routes/admin.py index 06c22ae01..da169b404 100644 --- a/files/routes/admin.py +++ b/files/routes/admin.py @@ -1217,7 +1217,7 @@ def unban_user(fullname, v): if not user.is_banned: abort(400) - if FEATURES['AWARDS'] and user.ban_reason and user.ban_reason.startswith('1-Day ban award'): + if FEATURES['AWARDS'] and user.ban_reason and user.ban_reason.startswith('Ban award'): abort(403, "You can't undo a ban award!") user.is_banned = None diff --git a/files/routes/awards.py b/files/routes/awards.py index f5f49ea57..f9c567136 100644 --- a/files/routes/awards.py +++ b/files/routes/awards.py @@ -319,7 +319,7 @@ def award_thing(v, thing_type, id): if not author.is_suspended or not author.unban_utc: abort(403) - if not author.ban_reason.startswith('1-Day Ban award'): + if not author.ban_reason.startswith('Ban award'): abort(400, "You can only use unban awards to undo the effect of ban awards!") if author.unban_utc - time.time() > 86400 * quantity: diff --git a/files/templates/userpage/admintools.html b/files/templates/userpage/admintools.html index 9dfde03b6..d8547bd89 100644 --- a/files/templates/userpage/admintools.html +++ b/files/templates/userpage/admintools.html @@ -8,7 +8,7 @@
BANNED USER: {{u.ban_reason | safe}} - {% if not u.ban_reason.startswith('1-Day ban award used by') %} + {% if not u.ban_reason.startswith('Ban award') %} (by {{u.banned_by | safe}}) {% endif %}