Use alternate API for conn-by-ip

This commit is contained in:
aclist committed 2022-09-04 04:40:21 +09:00
1 parent 2e6bcd4d15
commit 319ab2da9e
2 files changed
+11 -5

No files matched your search

+4
View File
@@ -6,6 +6,10 @@
- Standardize dialogs
- Query and connect by IP/port
## [2.6.0-rc.4] 2022-09-03
### Fixed
- Use alternate API for direct IP queries
## [2.6.0-rc.3] 2022-09-03
### Changed
- Revert to legacy API method
+7 -5
View File
@@ -401,9 +401,11 @@ connect(){
fi
ip=$(echo "$1" | awk -F"$separator" '{print $1}')
bid=$(echo "$1" | awk -F"$separator" '{print $2}')
#TODO: deprecated (for now)
#fetch_mods_sa "$ip"
fetch_mods "$bid"
if [[ $2 == "ip" ]]; then
fetch_mods_sa "$ip"
else
fetch_mods "$bid"
fi
validate_mods
rc=$?
[[ $rc -eq 1 ]] && return
@@ -464,12 +466,12 @@ ip_table(){
echo "No selection"
else
local gameport="$(echo "$sel" | awk -F: '{print $2}')"
local ip="$(echo "$sel" | awk -F: '{print $1}')"
ip="$(echo "$sel" | awk -F: '{print $1}')"
local addr=$(< $json jq -r --arg gameport $gameport '.servers[]|select(.gameport == ($gameport|tonumber)).addr')
local qport=$(echo "$addr" | awk -F: '{print $2}')
local sa_ip=$(echo "$ip:$gameport%%$qport")
qport_list="$sa_ip"
connect "$sel"
connect "$sel" "ip"
fi
done
}