aboutsummaryrefslogtreecommitdiffstats
path: root/app.py
diff options
context:
space:
mode:
Diffstat (limited to 'app.py')
-rw-r--r--app.py5
1 files changed, 5 insertions, 0 deletions
diff --git a/app.py b/app.py
index 2b7cfea..19c8ccf 100644
--- a/app.py
+++ b/app.py
@@ -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}",
send patches to the email below
yukais@pinapelz.com
include the subject [PATCH repo_name]
pinapelz.com
homepage