1.1.2 • Published 6 years ago
node-gtmpcheck v1.1.2
node-gtmpcheck
Check if a gt-mp server is reachable (UDP) and get the server information from the MTA-V masterlist.
Installation
npm install node-gtmpcheck --save
or if you are using yarn yarn add node-gtmpcheck
Usage
const gtmp = require('node-gtmpcheck');
const server = {
"host": "localhost",
"port": 4499
};
gtmp.reachable(server.host, server.port, (err, res) => {
if(err) {
console.log(err);
return;
}
console.log('Result: ', res);
});
gtmp.masterlist(server.host, server.port, (err, res) => {
if(err) {
console.log(err);
return;
}
console.log('Result: ', res.serverName);
});