shorter award names

pull/226/head
Aevann 2024-04-16 23:36:00 +02:00
parent 4560e7e8cd
commit 3f2890d6c3
4 changed files with 7 additions and 7 deletions

View File

@ -579,7 +579,7 @@ AWARDS = {
}, },
"flairlock": { "flairlock": {
"kind": "flairlock", "kind": "flairlock",
"title": "1-Day Flairlock", "title": "Flairlock",
"description": "Sets a flair for the recipient and locks it for 24 hours.", "description": "Sets a flair for the recipient and locks it for 24 hours.",
"icon": "fas fa-lock", "icon": "fas fa-lock",
"color": "text-black", "color": "text-black",
@ -607,7 +607,7 @@ AWARDS = {
}, },
"namelock": { "namelock": {
"kind": "namelock", "kind": "namelock",
"title": "1-Day Namelock", "title": "Namelock",
"description": "Changes the recipient's username to something of your choosing for 24 hours.", "description": "Changes the recipient's username to something of your choosing for 24 hours.",
"icon": "fas fa-at", "icon": "fas fa-at",
"color": "text-pink", "color": "text-pink",
@ -747,7 +747,7 @@ AWARDS = {
}, },
"ban": { "ban": {
"kind": "ban", "kind": "ban",
"title": "1-Day Ban", "title": "Ban",
"description": "Bans the recipient for a day.", "description": "Bans the recipient for a day.",
"icon": "fas fa-gavel", "icon": "fas fa-gavel",
"color": "text-danger", "color": "text-danger",
@ -761,7 +761,7 @@ AWARDS = {
}, },
"unban": { "unban": {
"kind": "unban", "kind": "unban",
"title": "1-Day Unban", "title": "Unban",
"description": "Removes 1 day from the ban duration of the recipient.", "description": "Removes 1 day from the ban duration of the recipient.",
"icon": "fas fa-gavel", "icon": "fas fa-gavel",
"color": "text-success", "color": "text-success",

View File

@ -1217,7 +1217,7 @@ def unban_user(fullname, v):
if not user.is_banned: if not user.is_banned:
abort(400) 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!") abort(403, "You can't undo a ban award!")
user.is_banned = None user.is_banned = None

View File

@ -319,7 +319,7 @@ def award_thing(v, thing_type, id):
if not author.is_suspended or not author.unban_utc: if not author.is_suspended or not author.unban_utc:
abort(403) 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!") abort(400, "You can only use unban awards to undo the effect of ban awards!")
if author.unban_utc - time.time() > 86400 * quantity: if author.unban_utc - time.time() > 86400 * quantity:

View File

@ -8,7 +8,7 @@
<h5 class="text-primary" id="profile-{{deviceType}}--banned">BANNED USER: <h5 class="text-primary" id="profile-{{deviceType}}--banned">BANNED USER:
{{u.ban_reason | safe}} {{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}}) (by {{u.banned_by | safe}})
{% endif %} {% endif %}