From 60ce674b961615ecff8b8b3962415473dd23cc3e Mon Sep 17 00:00:00 2001 From: Aevann Date: Thu, 14 Nov 2024 22:39:37 +0200 Subject: [PATCH] propagate underage temp bans --- files/routes/routehelpers.py | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/files/routes/routehelpers.py b/files/routes/routehelpers.py index b16b0c8e8..35326de39 100644 --- a/files/routes/routehelpers.py +++ b/files/routes/routehelpers.py @@ -127,6 +127,16 @@ def check_for_alts(current, include_current_session=False): u.ban_reason = current.ban_reason u.unban_utc = None g.db.add(u) + elif u.is_underage and not current.is_underage: + current.is_banned = u.is_banned + current.ban_reason = u.ban_reason + current.unban_utc = u.unban_utc + g.db.add(current) + elif current.is_underage and not u.is_underage: + u.is_banned = current.is_banned + u.ban_reason = current.ban_reason + u.unban_utc = current.unban_utc + g.db.add(u) if u.is_muted and not current.is_muted: current.is_muted = u.is_muted