fix vamp bug

master
Aevann 2023-04-23 04:42:25 +02:00
parent bde73fc665
commit 064918acd0
2 changed files with 11 additions and 11 deletions

View File

@ -70,11 +70,10 @@ def award_timers(v, bot=False):
v.bite = None
badge = v.has_badge(168)
if badge: g.db.delete(badge)
if "Vampire" not in v.old_house:
v.house = v.old_house
v.old_house = ''
notify_if_not_bot(f"Your vampire status has ended. You're now back in House {v.old_house.replace(' Founder', '')}!")
v.house = v.old_house
notify_if_not_bot(f"Your vampire status has ended. You're now back in House {v.old_house.replace(' Founder', '')}!")
v.old_house = ''
if v.earlylife and v.earlylife < now:
v.earlylife = None

View File

@ -409,12 +409,13 @@ def award_thing(v, thing_type, id):
g.db.add(thing)
elif "Vampire" in kind and kind == v.house:
if author.bite: author.bite += 172800
else: author.bite = int(time.time()) + 172800
if 'Vampire' not in author.house:
if not author.old_house:
author.old_house = author.house
author.house = 'Vampire'
else:
if v.house.startswith("Vampire"):
abort(400, f"{safe_username} is already a permanent vampire!")
author.bite = int(time.time()) + 172800
v.old_house = v.house
v.house = "Vampire"
badge_grant(user=author, badge_id=168)
elif "Racist" in kind and kind == v.house: