refactor: improper usage of hierarchy in squad-server/rcon.js getListPlayers()

This commit is contained in:
Fantino Davide 2023-12-26 16:01:45 +01:00
parent 5cd0286869
commit 2195006765

View File

@ -131,7 +131,7 @@ export default class SquadRcon extends Rcon {
};
}
async getListPlayers(server) {
async getListPlayers() {
const response = await this.execute('ListPlayers');
const players = [];
@ -144,7 +144,7 @@ export default class SquadRcon extends Rcon {
);
if (!match) continue;
if (server?.rcon?.addIds) server.rcon.addIds(match[3], match[2]);
if (this.addIds) this.addIds(match[3], match[2]);
const data = match.groups;
data.isLeader = data.isLeader === 'True';