fix: add rcon winner helper

This commit is contained in:
devRaGonSa
2026-05-19 12:08:16 +02:00
parent 8b0b651dc2
commit 635ed605dc

View File

@@ -565,6 +565,16 @@ def _string_or_none(value: object) -> str | None:
return normalized or None
def _resolve_rcon_winner(allied_score: int | None, axis_score: int | None) -> str | None:
if allied_score is None or axis_score is None:
return None
if allied_score > axis_score:
return "allied"
if axis_score > allied_score:
return "axis"
return "draw"
def _coerce_optional_int(value: object) -> int | None:
if value is None:
return None