forked from rDrama/rDrama
fix revert_actions
parent
33018c164b
commit
539188ed85
|
@ -263,20 +263,21 @@ def revert_actions(v, username):
|
||||||
|
|
||||||
for user in users:
|
for user in users:
|
||||||
user.shadowbanned = None
|
user.shadowbanned = None
|
||||||
user.is_banned = 0
|
|
||||||
user.unban_utc = 0
|
user.unban_utc = 0
|
||||||
user.ban_evade = 0
|
user.ban_evade = 0
|
||||||
user.ban_reason = None
|
user.ban_reason = None
|
||||||
if user.is_banned:
|
if user.is_banned:
|
||||||
|
user.is_banned = 0
|
||||||
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:
|
||||||
u.shadowbanned = None
|
u.shadowbanned = None
|
||||||
u.is_banned = 0
|
|
||||||
u.unban_utc = 0
|
u.unban_utc = 0
|
||||||
u.ban_evade = 0
|
u.ban_evade = 0
|
||||||
u.ban_reason = None
|
u.ban_reason = None
|
||||||
if u.is_banned:
|
if u.is_banned:
|
||||||
|
u.is_banned = 0
|
||||||
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)
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue