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")