Tidy PLAYER_DISCONNECTED event

This commit is contained in:
Thomas Smyth 2021-03-07 14:29:57 +00:00
parent 996418052d
commit 2367ed89e4

View File

@ -180,10 +180,8 @@ export default class SquadServer extends EventEmitter {
this.logParser.on('PLAYER_DISCONNECTED', async (data) => {
data.player = await this.getPlayerBySteamID(data.steamID);
if (data.player) data.player.suffix = data.playerSuffix;
delete data.steamID;
delete data.playerSuffix;
this.emit('PLAYER_DISCONNECTED', data);
});