remove ban_reason when unbanning users

master
Aevann1 2022-07-11 14:35:28 +02:00
parent 70ea10eaf6
commit bf1fec7918
3 changed files with 4 additions and 0 deletions

View File

@ -24,6 +24,7 @@ def award_timers(v, bot=False):
v.is_banned = 0
v.unban_utc = 0
v.ban_evade = 0
v.ban_reason = None
notify_if_not_bot("You have been unbanned!")
dirty = True
if v.agendaposter and v.agendaposter < now:

View File

@ -300,6 +300,7 @@ def revert_actions(v, username):
user.is_banned = 0
user.unban_utc = 0
user.ban_evade = 0
user.ban_reason = None
send_repeatable_notification(user.id, f"@{v.username} has unbanned you!")
g.db.add(user)
for u in user.alts:
@ -307,6 +308,7 @@ def revert_actions(v, username):
u.is_banned = 0
u.unban_utc = 0
u.ban_evade = 0
u.ban_reason = None
send_repeatable_notification(u.id, f"@{v.username} has unbanned you!")
g.db.add(u)

View File

@ -180,6 +180,7 @@ def award_thing(v, thing_type, id):
author.unban_utc = 0
author.is_banned = 0
author.ban_evade = 0
author.ban_reason = None
send_repeatable_notification(author.id, "You have been unbanned!")
if v.admin_level > 2: