From fcdea9c28e6e45fb0c0f38a2ae9ea545bf56758c Mon Sep 17 00:00:00 2001
From: Daniel Gibbs <me@danielgibbs.co.uk>
Date: Sun, 11 Feb 2024 00:58:30 +0000
Subject: [PATCH] public ip

---
 lgsm/modules/check_ip.sh | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/lgsm/modules/check_ip.sh b/lgsm/modules/check_ip.sh
index 7671429cd..bf0418f74 100644
--- a/lgsm/modules/check_ip.sh
+++ b/lgsm/modules/check_ip.sh
@@ -38,25 +38,25 @@ function fn_is_valid_ip() {
 
 # If the IP variable has been set by user.
 if fn_is_valid_ip "${ip}"; then
-	queryips=("${ip}")
+	queryips=("${ip}" "${publicip}")
 	httpip=("${ip}")
 	telnetip=("${ip}")
 # If the game config has an IP set.
 elif fn_is_valid_ip "${configip}"; then
-	queryips=("${configip}")
+	queryips=("${configip}" "${publicip}")
 	ip="${configip}"
 	httpip=("${configip}")
 	telnetip=("${configip}")
 # If there is only 1 server IP address.
 # Some IP details can automatically use the one IP.
 elif [ "${#current_ips[@]}" == "1" ]; then
-	queryips=("127.0.0.1" "${current_ips[@]}")
+	queryips=("127.0.0.1" "${current_ips[@]}" "${publicip}")
 	ip="0.0.0.0"
 	httpip=("${current_ips[@]}")
 	telnetip=("${current_ips[@]}")
 # If no ip is set by the user and server has more than one IP.
 else
-	queryips=("127.0.0.1" "${current_ips[@]}")
+	queryips=("127.0.0.1" "${current_ips[@]}" "${publicip}")
 	ip="0.0.0.0"
 	httpip=("${ip}")
 	telnetip=("${ip}")