Announce the winner of aborted matches too, only restarts stay silent

Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent)

Co-authored-by: Sisyphus <[email protected]>
This commit is contained in:
Debian
2026-09-18 12:20:46 +02:00
co-authored by Sisyphus
parent ca1666f3a5
commit 17dd04857f
+2 -6
View File
@@ -347,12 +347,8 @@ class EventParser:
if not self.game_state.server_info.is_team_mode(): if not self.game_state.server_info.is_team_mode():
return None return None
# Aborted/restarted matches have no winner - except forfeits, where # Restarted matches (server shutdown mid-game) have no winner; aborts
# the remaining scores are final and name a winner # and forfeits still have final scores that name one
exit_msg = str(data.get('EXIT_MSG', '') or '')
is_forfeit = 'forfeit' in exit_msg.lower()
if data.get('ABORTED') in (True, 'true', '1', 1) and not is_forfeit:
return None
try: try:
if int(data.get('RESTARTED', 0) or 0) != 0: if int(data.get('RESTARTED', 0) or 0) != 0:
return None return None