From 0a26fde839d3add9dc5a4d33acac431badf51a76 Mon Sep 17 00:00:00 2001 From: Aevann Date: Fri, 15 Nov 2024 23:43:45 +0200 Subject: [PATCH] make all temp bans propagate to future alts on WPD --- files/routes/routehelpers.py | 21 +++++++++++---------- 1 file changed, 11 insertions(+), 10 deletions(-) diff --git a/files/routes/routehelpers.py b/files/routes/routehelpers.py index 35326de39..e4fe34e64 100644 --- a/files/routes/routehelpers.py +++ b/files/routes/routehelpers.py @@ -127,16 +127,17 @@ 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) + elif SITE_NAME == 'WPD': + if u.is_suspended and not current.is_suspended: + 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_suspended and not u.is_suspended: + 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