watchmen-ping-mc2
Version:
Watchmen Minecraft server pinger
16 lines (12 loc) • 454 B
JavaScript
const mcping = require('mc-ping-updated');
function PingService(){}
exports = module.exports = PingService;
PingService.prototype.ping = function(service, callback){
var startTime = +new Date();
mcping(service.url, service.port, function(err, res) {
callback(err, res, +new Date() - startTime);
}, 3000);
};
PingService.prototype.getDefaultOptions = function(){
return {}; // there is not need for UI confi options for this ping service
}