spider: fix bug that would instantly eat a spider award if someone was permanently spidered

master
justcool393 2022-11-12 04:21:11 -06:00
parent 5949e5983b
commit c4c4076560
1 changed files with 5 additions and 2 deletions

View File

@ -162,10 +162,13 @@ def award_thing(v, thing_type, id):
abort(403, f"@{author.username} is immune to awards.")
if kind == "benefactor" and author.id == v.id:
abort(400, "You can't use this award on yourself.")
abort(403, "You can't use this award on yourself.")
if kind == 'marsify' and author.marsify == 1:
abort(403, "User is already permanently marsified!")
abort(409, "User is already permanently marsified!")
if kind == 'spider' and author.spider == 1:
abort(409, "User already permanently has a spider friend!")
if thing.ghost and not AWARDS[kind]['ghost']:
abort(403, "This kind of award can't be used on ghost posts.")