From 21b2263e3019cab7f303f8fa1c8ee973e76a3c9d Mon Sep 17 00:00:00 2001 From: funman300 Date: Wed, 5 Aug 2026 10:05:57 -0700 Subject: [PATCH] fifa17-recon: family flags -- FUT_CONSUMABLES=0 meant ON os.environ.get returns the STRING "0", which is truthy, so anyone typing FUT_CONSUMABLES=0 to turn the family off would have turned it on. "", "0", "off", "no" and "false" now all mean off; any other value is the mode string ("1", "all"). Co-Authored-By: Claude Opus 5 Claude-Session: https://claude.ai/code/session_01VUT92pz6RWKih9dSr8ZpxW --- fifa17-recon/tools/utas_server.py | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/fifa17-recon/tools/utas_server.py b/fifa17-recon/tools/utas_server.py index 4a8d077..f768ecf 100755 --- a/fifa17-recon/tools/utas_server.py +++ b/fifa17-recon/tools/utas_server.py @@ -1477,9 +1477,17 @@ def sweep_items(): # FUT_MANAGERS=1 serve on type=manager|staff # Every club fetch logs the ?type= it was asked for while any of the three is set, so # a null result tells the human WHICH arm to aim at instead of nothing at all. -CONSUMABLES = os.environ.get("FUT_CONSUMABLES", "") -COACHES = os.environ.get("FUT_COACHES", "") -MANAGERS = os.environ.get("FUT_MANAGERS", "") +def _family_flag(name): + """"" / "0" / "off" all mean OFF. Without this, FUT_CONSUMABLES=0 would be a + non-empty string and would quietly turn the family ON -- the opposite of what + anyone typing it means.""" + v = os.environ.get(name, "").strip().lower() + return "" if v in ("", "0", "off", "no", "false") else v + + +CONSUMABLES = _family_flag("FUT_CONSUMABLES") +COACHES = _family_flag("FUT_COACHES") +MANAGERS = _family_flag("FUT_MANAGERS") FAMILIES_ON = bool(CONSUMABLES or COACHES or MANAGERS) MANAGER_TYPES = ("manager", "staff")