const request = require('request'); class BuildAndShoot extends require('./core') { run(state) { request({ uri: 'http://'+this.options.address+':'+this.options.port_query+'/', timeout: 3000, }, (e,r,body) => { if(e) return this.fatal('HTTP error'); let m; m = body.match(/status server for (.*?)\r|\n/); if(m) state.name = m[1]; m = body.match(/Current uptime: (\d+)/); if(m) state.raw.uptime = m[1]; m = body.match(/currently running (.*?) by /); if(m) state.map = m[1]; m = body.match(/Current players: (\d+)\/(\d+)/); if(m) { state.raw.numplayers = m[1]; state.maxplayers = m[2]; } m = body.match(/class="playerlist"([^]+?)\/table/); if(m) { const table = m[1]; const pre = /