|
|
@ -264,11 +264,11 @@ if [ "$(command -v jq 2>/dev/null)" ]; then |
|
|
|
if [ "${steammaster}" == "true" ]; then |
|
|
|
# Will query server IP addresses first. |
|
|
|
for queryip in "${queryips[@]}"; do |
|
|
|
masterserver=$(curl -m 3 -s 'https://api.steampowered.com/ISteamApps/GetServersAtAddress/v0001?addr='${queryip}':'${port}'&format=json' | jq '.response.servers[]|.addr' | wc -l 2>/dev/null) |
|
|
|
masterserver="$(curl -m 3 -s 'https://api.steampowered.com/ISteamApps/GetServersAtAddress/v0001?addr='${queryip}':'${port}'&format=json' | jq '.response.servers[]|.addr' | wc -l 2>/dev/null)" |
|
|
|
done |
|
|
|
# Should that not work it will try the external IP. |
|
|
|
if [ "${masterserver}" == "0" ]; then |
|
|
|
masterserver=$(curl -m 3 -s 'https://api.steampowered.com/ISteamApps/GetServersAtAddress/v0001?addr='${extip}':'${port}'&format=json' | jq '.response.servers[]|.addr' | wc -l 2>/dev/null) |
|
|
|
masterserver="$(curl -m 3 -s 'https://api.steampowered.com/ISteamApps/GetServersAtAddress/v0001?addr='${extip}':'${port}'&format=json' | jq '.response.servers[]|.addr' | wc -l 2>/dev/null)" |
|
|
|
fi |
|
|
|
if [ "${masterserver}" == "0" ]; then |
|
|
|
displaymasterserver="false" |
|
|
|