mirror of
https://github.com/tribufu/node-gamedig
synced 2026-06-01 09:42:41 +00:00
More async
This commit is contained in:
parent
29ce0b82d0
commit
e937c725bb
20 changed files with 100 additions and 86 deletions
|
|
@ -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')) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue