forked from MarseyWorld/MarseyWorld
Merge branch 'frost' of https://github.com/Aevann1/rDrama into frost
commit
d032023658
|
@ -166,7 +166,7 @@ def award_thing(v, thing_type, id):
|
|||
|
||||
author = thing.author
|
||||
|
||||
if author.id in (PIZZASHILL_ID, DAD_ID, CARP_ID) and v.id not in (PIZZASHILL_ID, DAD_ID, CARP_ID):
|
||||
if author.id in (PIZZASHILL_ID, CARP_ID):
|
||||
return {"error": "This user is immune to awards."}, 403
|
||||
|
||||
if kind == "benefactor" and author.id == v.id:
|
||||
|
@ -288,6 +288,15 @@ def award_thing(v, thing_type, id):
|
|||
else: author.agendaposter = int(time.time()) + 86400
|
||||
|
||||
badge_grant(user=author, badge_id=28)
|
||||
|
||||
if v.admin_level > 2:
|
||||
ma = ModAction(
|
||||
kind="agendaposter",
|
||||
user_id=v.id,
|
||||
target_user_id=author.id,
|
||||
note=f"for 1 day"
|
||||
)
|
||||
g.db.add(ma)
|
||||
elif kind == "flairlock":
|
||||
if thing.ghost: abort(403)
|
||||
new_name = note[:100].replace("𒐪","")
|
||||
|
@ -357,8 +366,7 @@ def award_thing(v, thing_type, id):
|
|||
else: author.rehab = int(time.time()) + 86400
|
||||
badge_grant(user=author, badge_id=109)
|
||||
elif kind == "deflector":
|
||||
if author.deflector: author.deflector += 36000
|
||||
else: author.deflector = int(time.time()) + 36000
|
||||
author.deflector = int(time.time()) + 36000
|
||||
elif kind == "beano":
|
||||
badge_grant(user=author, badge_id=128)
|
||||
elif kind == "checkmark":
|
||||
|
|
Loading…
Reference in New Issue