From 4e0960ccff140e243222728be07dcba6b1db8214 Mon Sep 17 00:00:00 2001 From: thomasciesla Date: Tue, 9 Dec 2025 08:39:49 +0100 Subject: [PATCH] geoip_shop_manager.py aktualisiert --- geoip_shop_manager.py | 32 ++++++++++++++++++++++++++++---- 1 file changed, 28 insertions(+), 4 deletions(-) diff --git a/geoip_shop_manager.py b/geoip_shop_manager.py index ce1ca7e..a8acc14 100644 --- a/geoip_shop_manager.py +++ b/geoip_shop_manager.py @@ -1346,6 +1346,7 @@ def show_all_logs(): print(f"\n{'═' * 70}") print(" 📊 GESAMTÜBERSICHT ALLER SHOPS") print(f"{'═' * 70}") + print(f" {COLOR_GREEN}Grün = hinter Link11{COLOR_RESET} | {COLOR_RED}Rot = Direkt{COLOR_RESET}") total_php_blocks = 0 shop_php_stats = {} # shop -> {'blocks': N, 'activation': datetime, 'req_min': float, 'ips': {}} @@ -1402,7 +1403,15 @@ def show_all_logs(): runtime = stats['runtime_minutes'] bar = "█" * min(int(req_min * 2), 20) if req_min > 0 else "" runtime_str = format_duration(runtime) if runtime > 0 else "?" - print(f" ├─ {shop}: {count} ({req_min:.1f} req/min, seit {runtime_str}) {bar}") + + # Color shop name based on Link11 status + link11_info = check_link11(shop) + if link11_info['is_link11']: + shop_colored = f"{COLOR_GREEN}{shop}{COLOR_RESET}" + else: + shop_colored = f"{COLOR_RED}{shop}{COLOR_RESET}" + + print(f" ├─ {shop_colored}: {count} ({req_min:.1f} req/min, seit {runtime_str}) {bar}") # Show top IP for this shop shop_ips = stats['ips'] @@ -1428,7 +1437,15 @@ def show_all_logs(): for shop in sorted(crowdsec_stats.keys()): count = crowdsec_stats[shop] bar = "█" * min(count // 10, 20) if count > 0 else "" - print(f" ├─ {shop}: {count} {bar}") + + # Color shop name based on Link11 status + link11_info = check_link11(shop) + if link11_info['is_link11']: + shop_colored = f"{COLOR_GREEN}{shop}{COLOR_RESET}" + else: + shop_colored = f"{COLOR_RED}{shop}{COLOR_RESET}" + + print(f" ├─ {shop_colored}: {count} {bar}") elif check_crowdsec(): print(" └─ Keine aktiven Bans") else: @@ -1454,9 +1471,16 @@ def show_all_logs(): top_shop_count = top_shop[1] # Shorten shop name if too long if len(top_shop_name) > 25: - top_shop_display = top_shop_name[:22] + '...' + top_shop_short = top_shop_name[:22] + '...' else: - top_shop_display = top_shop_name + top_shop_short = top_shop_name + + # Color shop name based on Link11 status + link11_info = check_link11(top_shop_name) + if link11_info['is_link11']: + top_shop_display = f"{COLOR_GREEN}{top_shop_short}{COLOR_RESET}" + else: + top_shop_display = f"{COLOR_RED}{top_shop_short}{COLOR_RESET}" else: top_shop_display = "?" top_shop_count = 0