fix grass exploit
parent
bfb562561b
commit
0d3f546e30
|
@ -295,8 +295,11 @@ def award_thing(v, thing_type, id):
|
|||
author.ban_reason = None
|
||||
send_repeatable_notification(author.id, "You have been unbanned!")
|
||||
elif kind == "grass":
|
||||
new_unban_utc = int(time.time()) + 30 * 86400
|
||||
if author.unban_utc > new_unban_utc:
|
||||
abort(403, f"{safe_username} already banned for more than 30 days!")
|
||||
author.is_banned = AUTOJANNY_ID
|
||||
author.unban_utc = int(time.time()) + 30 * 86400
|
||||
author.unban_utc = new_unban_utc
|
||||
send_repeatable_notification(author.id, f"@{v.username} gave you the grass award on {obj.textlink} and as a result you have been banned! You must [send the admins](/contact) a timestamped picture of you touching grass/snow/sand/ass to get unbanned!")
|
||||
elif kind == "pin":
|
||||
if not FEATURES['PINS']: abort(403)
|
||||
|
|
Loading…
Reference in New Issue