forked from rDrama/rDrama
remove ban_reason when unbanning users
parent
70ea10eaf6
commit
bf1fec7918
|
@ -24,6 +24,7 @@ def award_timers(v, bot=False):
|
||||||
v.is_banned = 0
|
v.is_banned = 0
|
||||||
v.unban_utc = 0
|
v.unban_utc = 0
|
||||||
v.ban_evade = 0
|
v.ban_evade = 0
|
||||||
|
v.ban_reason = None
|
||||||
notify_if_not_bot("You have been unbanned!")
|
notify_if_not_bot("You have been unbanned!")
|
||||||
dirty = True
|
dirty = True
|
||||||
if v.agendaposter and v.agendaposter < now:
|
if v.agendaposter and v.agendaposter < now:
|
||||||
|
|
|
@ -300,6 +300,7 @@ def revert_actions(v, username):
|
||||||
user.is_banned = 0
|
user.is_banned = 0
|
||||||
user.unban_utc = 0
|
user.unban_utc = 0
|
||||||
user.ban_evade = 0
|
user.ban_evade = 0
|
||||||
|
user.ban_reason = None
|
||||||
send_repeatable_notification(user.id, f"@{v.username} has unbanned you!")
|
send_repeatable_notification(user.id, f"@{v.username} has unbanned you!")
|
||||||
g.db.add(user)
|
g.db.add(user)
|
||||||
for u in user.alts:
|
for u in user.alts:
|
||||||
|
@ -307,6 +308,7 @@ def revert_actions(v, username):
|
||||||
u.is_banned = 0
|
u.is_banned = 0
|
||||||
u.unban_utc = 0
|
u.unban_utc = 0
|
||||||
u.ban_evade = 0
|
u.ban_evade = 0
|
||||||
|
u.ban_reason = None
|
||||||
send_repeatable_notification(u.id, f"@{v.username} has unbanned you!")
|
send_repeatable_notification(u.id, f"@{v.username} has unbanned you!")
|
||||||
g.db.add(u)
|
g.db.add(u)
|
||||||
|
|
||||||
|
|
|
@ -180,6 +180,7 @@ def award_thing(v, thing_type, id):
|
||||||
author.unban_utc = 0
|
author.unban_utc = 0
|
||||||
author.is_banned = 0
|
author.is_banned = 0
|
||||||
author.ban_evade = 0
|
author.ban_evade = 0
|
||||||
|
author.ban_reason = None
|
||||||
send_repeatable_notification(author.id, "You have been unbanned!")
|
send_repeatable_notification(author.id, "You have been unbanned!")
|
||||||
|
|
||||||
if v.admin_level > 2:
|
if v.admin_level > 2:
|
||||||
|
|
Loading…
Reference in New Issue