SquadJS/squad-server/log-parser/player-un-possess.js

17 lines
489 B
JavaScript
Raw Normal View History

2020-05-15 14:23:16 -05:00
export default {
2020-05-21 16:08:07 -05:00
regex: /^\[([0-9.:-]+)]\[([ 0-9]*)]LogSquadTrace: \[DedicatedServer](?:ASQPlayerController::)?OnUnPossess\(\): PC=(.+)/,
2020-10-14 10:40:11 -05:00
onMatch: (args, logParser) => {
2020-05-15 14:23:16 -05:00
const data = {
raw: args[0],
time: args[1],
chainID: args[2],
2020-10-05 12:52:01 -05:00
playerSuffix: args[3],
switchPossess: args[3] in logParser.eventStore && logParser.eventStore[args[3]] === args[2]
2020-05-15 14:23:16 -05:00
};
delete logParser.eventStore[args[3]];
2020-10-05 12:52:01 -05:00
logParser.emit('PLAYER_UNPOSSESS', data);
2020-05-15 14:23:16 -05:00
}
};