arma-server-web-admin/routes/servers/gamespy.js

18 lines
319 B
JavaScript
Raw Normal View History

2014-04-08 21:49:40 +00:00
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);
}
}
);
};