More async

This commit is contained in:
mmorrison 2019-01-12 05:45:09 -06:00
parent 29ce0b82d0
commit e937c725bb
20 changed files with 100 additions and 86 deletions

View file

@ -9,7 +9,7 @@ class BuildAndShoot extends Core {
let m;
m = body.match(/status server for (.*?)\r|\n/);
m = body.match(/status server for (.*?)\.?(\r|\n)/);
if(m) state.name = m[1];
m = body.match(/Current uptime: (\d+)/);
@ -24,6 +24,11 @@ class BuildAndShoot extends Core {
state.maxplayers = m[2];
}
m = body.match(/aos:\/\/[0-9]+:[0-9]+/);
if (m) {
state.connect = m[0];
}
const $ = cheerio.load(body);
$('#playerlist tbody tr').each((i,tr) => {
if (!$(tr).find('td').first().attr('colspan')) {