fix rcon return

This commit is contained in:
Skillet 2023-04-21 18:35:47 -04:00
parent 68c3b0da53
commit f9bfacc07d

View File

@ -1111,8 +1111,13 @@ layer
'http://hub.afocommunity.com/api/layers.json', [0, 1959152751] 'http://hub.afocommunity.com/api/layers.json', [0, 1959152751]
); );
const rconLayers = (await this.server.rcon.execute('ListLayers'))?.split('\n') || []; const rconRaw = (await this.server.rcon.execute('ListLayers'))?.split('\n') || [];
rconLayers.shift(); rconRaw.shift();
const rconLayers = [];
for (const raw of rconRaw){
rconLayers.push(raw.split(' ')[0]);
}
for (const layer of response.data.Maps) { for (const layer of response.data.Maps) {
this.verbose(1, 'pulled layer: ', layer.rawName); this.verbose(1, 'pulled layer: ', layer.rawName);