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:
cetteup 2020-08-24 20:27:44 +02:00
parent b99abcd8b3
commit a362d1d113
3 changed files with 9 additions and 3 deletions

View file

@ -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,