arma-server-web-admin/routes/servers/gamespy.js
2014-04-08 23:49:40 +02:00

18 lines
319 B
JavaScript

var Gamedig = require('gamedig');
var ip = require('ip');
exports.index = function (req, res){
Gamedig.query({
type: 'arma3',
host: ip.address()
},
function(state) {
if(state.error) {
res.send({error: state.error});
} else {
res.send(state.raw);
}
}
);
};