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

21 lines
623 B
JavaScript
Raw Normal View History

2020-10-05 12:52:01 -05:00
export default {
regex:
/^\[([0-9.:-]+)]\[([ 0-9]*)]LogSquad: PostLogin: NewPlayer: BP_PlayerController_C .+PersistentLevel\.([^\s]+) \(IP: ([\d.]+) \| Online IDs: EOS: ([0-9a-f]{32}) steam: (\d+)\)/,
2020-10-14 10:40:11 -05:00
onMatch: (args, logParser) => {
2020-10-05 12:52:01 -05:00
const data = {
raw: args[0],
time: args[1],
chainID: +args[2],
ip: args[4],
eosID: args[5],
steamID: args[6]
2020-10-05 12:52:01 -05:00
};
const joinRequestData = logParser.eventStore.joinRequests[+args[2]];
data.connection = joinRequestData.connection;
data.playerSuffix = joinRequestData.suffix;
2020-10-05 12:52:01 -05:00
logParser.emit('PLAYER_CONNECTED', data);
}
};