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:
+2
-6
@@ -347,12 +347,8 @@ class EventParser:
|
||||
if not self.game_state.server_info.is_team_mode():
|
||||
return None
|
||||
|
||||
# Aborted/restarted matches have no winner - except forfeits, where
|
||||
# the remaining scores are final and name a winner
|
||||
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
|
||||
# Restarted matches (server shutdown mid-game) have no winner; aborts
|
||||
# and forfeits still have final scores that name one
|
||||
try:
|
||||
if int(data.get('RESTARTED', 0) or 0) != 0:
|
||||
return None
|
||||
|
||||
Reference in New Issue
Block a user