From 56cf292eaca66f976afd4f63500277511b94d616 Mon Sep 17 00:00:00 2001 From: Aevann Date: Thu, 14 Sep 2023 23:50:06 +0300 Subject: [PATCH] make permabans propagate to alts on carp request --- files/routes/routehelpers.py | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/files/routes/routehelpers.py b/files/routes/routehelpers.py index 477babf4b..d41b91557 100644 --- a/files/routes/routehelpers.py +++ b/files/routes/routehelpers.py @@ -104,6 +104,16 @@ def check_for_alts(current, include_current_session=False): u.shadowbanned = current.shadowbanned u.ban_reason = current.ban_reason g.db.add(u) + elif u.is_permabanned and not current.is_permabanned: + current.is_banned = u.is_banned + current.ban_reason = u.ban_reason + current.unban_utc = 0 + g.db.add(current) + elif current.is_permabanned and not u.is_permabanned: + u.is_banned = current.is_banned + u.ban_reason = current.ban_reason + u.unban_utc = 0 + g.db.add(u) if u.is_muted and not current.is_muted: current.is_muted = u.is_muted