mirror of
https://github.com/tribufu/node-gamedig
synced 2026-05-18 09:35:50 +00:00
Added givenPortOnly user option
Allows user to disable gamedig's default behavior of adding query attempts using the default query port(-offset)
This commit is contained in:
parent
b99abcd8b3
commit
a362d1d113
3 changed files with 9 additions and 3 deletions
|
|
@ -30,7 +30,7 @@ class QueryRunner {
|
|||
const attempts = [];
|
||||
|
||||
if (userOptions.port) {
|
||||
if (gameQueryPortOffset) {
|
||||
if (gameQueryPortOffset && !userOptions.givenPortOnly) {
|
||||
attempts.push({
|
||||
...defaultOptions,
|
||||
...gameOptions,
|
||||
|
|
@ -38,7 +38,7 @@ class QueryRunner {
|
|||
port: userOptions.port + gameQueryPortOffset
|
||||
});
|
||||
}
|
||||
if (userOptions.port === gameOptions.port && gameQueryPort) {
|
||||
if (userOptions.port === gameOptions.port && gameQueryPort && !userOptions.givenPortOnly) {
|
||||
attempts.push({
|
||||
...defaultOptions,
|
||||
...gameOptions,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue