Skip to content

Commit

Permalink
Merge pull request #119 from TS3Tools/Issue-118-Fix-incorrect-gathere…
Browse files Browse the repository at this point in the history
…d-ServerQuery-IP

Issue #118: Fix gathering of ServerQuery IP/Port when unexpected chars are included
  • Loading branch information
Sebbo94BY authored Dec 2, 2022
2 parents 75723c8 + b72e898 commit 0d59057
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
6 changes: 3 additions & 3 deletions TS3UpdateScript
Original file line number Diff line number Diff line change
Expand Up @@ -879,10 +879,10 @@ function getServerQueryIP() {
fi

if [[ -n "$SERVER_QUERY_IP" ]]; then
if [[ "$SERVER_QUERY_IP" == "0.0.0.0" ]]; then
if [[ "$SERVER_QUERY_IP" =~ 0\.0\.0\.0 ]]; then
echo -n "127.0.0.1";
else
echo -n "$SERVER_QUERY_IP";
echo -n "$SERVER_QUERY_IP" | grep -Eo "([0-9]+[.]){3}[0-9]+";
fi
else
echo -n "127.0.0.1";
Expand All @@ -897,7 +897,7 @@ function getServerQueryPort() {
SERVER_QUERY_PORT="$(grep -E '^query_port=[0-9]{4,5}$' < ${1}/ts3server.ini | cut -d '=' -f 2)"

if [[ -n "$SERVER_QUERY_PORT" ]]; then
echo -n "$SERVER_QUERY_PORT";
echo -n "$SERVER_QUERY_PORT" | grep -Eo "([0-9]+)";
else
echo -n "10011";
fi
Expand Down
4 changes: 4 additions & 0 deletions docs/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,10 @@ Hotfix | Important fix for one more issues, which causes a not (correct) working

## Releases

### Version 6.0.3 (2022-12-02)

* Issue #118: Fix gathering of ServerQuery IP and port when unexpected characters are included

### Version 6.0.2 (2022-11-23)

+ Implement check for downloaded TeamSpeak server files
Expand Down

0 comments on commit 0d59057

Please sign in to comment.