mirror of
https://github.com/tribufu/node-gamedig
synced 2026-05-06 15:17:36 +00:00
Add support for udp bind port override (3.0.5) Fixes #149
This commit is contained in:
parent
68b8dfd684
commit
ce4e728493
8 changed files with 59 additions and 26 deletions
|
|
@ -5,7 +5,7 @@ const Minimist = require('minimist'),
|
|||
|
||||
const argv = Minimist(process.argv.slice(2), {
|
||||
boolean: ['pretty','debug','givenPortOnly'],
|
||||
string: ['guildId']
|
||||
string: ['guildId','listenUdpPort']
|
||||
});
|
||||
|
||||
const debug = argv.debug;
|
||||
|
|
@ -41,7 +41,8 @@ if (givenPortOnly) {
|
|||
options.givenPortOnly = true;
|
||||
}
|
||||
|
||||
Gamedig.query(options)
|
||||
const gamedig = new Gamedig(options);
|
||||
gamedig.query(options)
|
||||
.then((state) => {
|
||||
if(pretty) {
|
||||
console.log(JSON.stringify(state,null,' '));
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue