diff options
| author | Pinapelz <yukais@pinapelz.com> | 2026-07-18 07:01:30 -0700 |
|---|---|---|
| committer | Pinapelz <yukais@pinapelz.com> | 2026-07-18 07:02:43 -0700 |
| commit | 53904f0cf0ff61595e5556e046a250dd2e152fa5 (patch) | |
| tree | f87ea3ab4ca974851a8210b13b9e53a00986d8a6 /app.py | |
| parent | 22b43e361009db0bff8380bbcd52a3f0720ff0d2 (diff) | |
add config option to skip if exceeding client count
due to rate limit issues with TS6
Diffstat (limited to 'app.py')
| -rw-r--r-- | app.py | 5 |
1 files changed, 5 insertions, 0 deletions
@@ -49,9 +49,14 @@ def fetch_teamspeak_data(cfg): client_list = clients_json.get("body") or [] + afk_threshold = cfg.get("afk_status_max_clients") + fetch_afk_status = afk_threshold is None or len(client_list) <= afk_threshold + for client in client_list: clid = client.get("clid") nickname = client.get("client_nickname") + if not fetch_afk_status: + continue if clid and nickname != "serveradmin": client_info_res = requests.get( f"{base_url}/clientinfo?clid={clid}", |
