SquadJS/log-parser/rules/player-revived.js

17 lines
431 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 (.+)\./,
onMatch: async (args, logParser) => {
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
}
};