SquadJS/squad-server/log-parser/player-revived.js
2020-12-10 20:46:29 +00:00

17 lines
425 B
JavaScript

export default {
// the names are currently the wrong way around in these logs
regex: /^\[([0-9.:-]+)]\[([ 0-9]*)]LogSquad: (.+) has revived (.+)\./,
onMatch: (args, logParser) => {
const data = {
...logParser.eventStore[args[3]],
raw: args[0],
time: args[1],
chainID: args[2],
reviverName: args[3],
victimName: args[4]
};
logParser.emit('PLAYER_REVIVED', data);
}
};