SquadJS/squad-server/log-parser/round-winner.js

17 lines
461 B
JavaScript
Raw Permalink Normal View History

2020-09-13 17:31:28 -05:00
export default {
regex:
/^\[([0-9.:-]+)]\[([ 0-9]*)]LogSquadTrace: \[DedicatedServer](?:ASQGameMode::)?DetermineMatchWinner\(\): (.+) won on (.+)/,
2020-09-13 17:31:28 -05:00
onMatch: (args, logParser) => {
const data = {
raw: args[0],
time: args[1],
chainID: args[2],
winner: args[3],
layer: args[4]
};
2020-09-14 19:18:04 -05:00
if (logParser.eventStore.WON) logParser.eventStore.WON = { ...data, winner: null };
else logParser.eventStore.WON = data;
2020-09-13 17:31:28 -05:00
}
};