minor fixes to last couple of commits

pull/143/head
Aevann 2023-05-03 19:06:14 +03:00
parent 79e9d24ae2
commit c6cdf9fdca
3 changed files with 8 additions and 2 deletions

View File

@ -17,6 +17,9 @@ def award_timers(v, bot=False):
v.patron = 0
v.patron_utc = 0
notify_if_not_bot(f"Your {patron} status has expired!")
for i in (22,23,24,25,26,27,28):
badge = v.has_badge(i)
if badge: g.db.delete(badge)
if v.unban_utc and v.unban_utc < now:
v.is_banned = None
v.unban_utc = 0
@ -27,7 +30,7 @@ def award_timers(v, bot=False):
v.agendaposter_phrase = None
v.chudded_by = None
notify_if_not_bot("Your chud status has expired!")
badge = v.has_badge(28)
badge = v.has_badge(58)
if badge: g.db.delete(badge)
if v.flairchanged and v.flairchanged < now:
v.flairchanged = None

View File

@ -804,7 +804,7 @@ def unagendaposter(id, v):
g.db.add(ma)
badge = user.has_badge(28)
badge = user.has_badge(58)
if badge: g.db.delete(badge)
send_repeatable_notification(user.id, f"@{v.username} (a site admin) has unchudded you.")

View File

@ -1,3 +1,4 @@
update badge_defs set name='X', description='X' where id=21;
update badge_defs set name='Paypig', description='Contributes $5/month' where id=22;
update badge_defs set name='Renthog', description='Contributes $10/month' where id=23;
update badge_defs set name='Landchad', description='Contributes $20/month' where id=24;
@ -20,3 +21,5 @@ update users set patron=5 where id in (select user_id from badges where badge_id
update users set patron=6 where id in (select user_id from badges where badge_id=26);
update users set patron=7 where id in (select user_id from badges where badge_id=27);
update users set patron=8 where id in (select user_id from badges where badge_id=28);
update users set patron=0 where patron>0 and patron_utc=0;