SquadJS/squad-server/log-parser/player-revived.js

17 lines
425 B
JavaScript
Raw Normal View History

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