mirror of
https://github.com/AsgardEternal/SquadJS.git
synced 2024-09-28 14:04:25 -05:00
player disconnect bug logging
This commit is contained in:
parent
3fce6e4a8b
commit
e2c5b851f0
@ -243,11 +243,14 @@ export default class SquadServer extends EventEmitter {
|
|||||||
});
|
});
|
||||||
|
|
||||||
this.logParser.on('PLAYER_DISCONNECTED', async (data) => {
|
this.logParser.on('PLAYER_DISCONNECTED', async (data) => {
|
||||||
|
Logger.verbose('PlayerBugFix', 1, `player ${data.steamID} disconnect with playerinfo: ${JSON.stringify(this.playerinfo)}`);
|
||||||
data.player = await this.getPlayerBySteamID(data.steamID);
|
data.player = await this.getPlayerBySteamID(data.steamID);
|
||||||
if (!data.player) {
|
if (!data.player) {
|
||||||
|
Logger.verbose('PlayerBugFix', 1, `Bug detected, using playerinfo data for ${data.steamID}`);
|
||||||
data.player = this.playerinfo.get(data.steamID);
|
data.player = this.playerinfo.get(data.steamID);
|
||||||
}
|
}
|
||||||
if (!data.player) {
|
if (!data.player) {
|
||||||
|
Logger.verbose('PlayerBugFix', 1, `Bug detected, FAILED, falling back for ${data.steamID}`);
|
||||||
data.player = {
|
data.player = {
|
||||||
steamID: data.steamID
|
steamID: data.steamID
|
||||||
};
|
};
|
||||||
|
Loading…
Reference in New Issue
Block a user