forked from MarseyWorld/MarseyWorld
spider: fix bug that would instantly eat a spider award if someone was permanently spidered
parent
5949e5983b
commit
c4c4076560
|
@ -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.")
|
||||
|
|
Loading…
Reference in New Issue