forked from rDrama/rDrama
1
0
Fork 0

fix thisL

"Marsey lifehack: grass someone then ban award them so jannies can’t unban when they touch grass"
master
Aevann 2024-05-23 03:29:24 +03:00
parent cab8b2bdc3
commit 15ebfb84fc
1 changed files with 3 additions and 0 deletions

View File

@ -283,6 +283,9 @@ def award_thing(v, thing_type, id):
g.db.add(award)
if kind in {"ban", "grass"}:
if author.is_suspended and author.ban_reason.startswith('Grass award used by @'):
abort(400, f"You can't give a {kind} award to an already-grassed user!")
ban_reason_link = f"/{thing_type}/{obj.id}"
if isinstance(obj, Comment):
ban_reason_link += '#context'