From 2805240abcdcb50fa089c7c5d51e4c2bd531c58e Mon Sep 17 00:00:00 2001 From: SpudGunMan Date: Sat, 1 Nov 2025 13:16:15 -0700 Subject: [PATCH] APIthrottle->autoBan --- modules/system.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/modules/system.py b/modules/system.py index 7824105..4d0049d 100644 --- a/modules/system.py +++ b/modules/system.py @@ -1004,6 +1004,8 @@ def api_throttle(node_id, rxInterface=None, channel=None, apiName=""): node_entry['lastSeen'] = current_time if node_entry['api_throttle_count'] > apiThrottleValue: logger.warning(f"System: Node {node_id_str} throttled on API {apiName} count: {node_entry['api_throttle_count']}") + if autoBanEnabled: + ban_hammer(node_id_str, reason="API Throttle Exceeded") return "🚦 System busy, try again later." else: # node not found, create a new entry