Przeglądaj źródła

feat(info): refactor info modules (#3428)

* add new details to queryraw

* fix httpport ac server

* correct info bug for bt1944server

* added bt1944 to info_parms


update info messages


bt1944ports

* steamport

* raw port


raw

* message display

* check_root bug

* add more ports


merge


words

* arma 3 improvements

* master port

* add arma3 ports

* portnames

* strip ./ from executable

* exec

* integrate ss

* replace netstat with ss

* port header


headerr

* remove inbound outbound

* ark

* shorten executable

* change to port display

* add info_distro

* response

* acserver improvements


acserver


ac

* add assettocorsa query

* ss

* rawport

* update av server exec


merge


av changes

* av ports

* av ss


bug

* av

* avserver

* remove port

* port changes

* listen

* col

* bt1944

* cmw


cmw

* cmw

* changes

* etl

* add servers

* hw

* inss


ins

* add rcon to insserver

* rcon

* jc

* jc3 minecraft

* mcb

* onset

* Memories of mars

* mumble

* changes

* steamport

* tcp query

* udp

* fix

* steamport

* info_distro now required before parms

* srcdslinuxopid

* srcds_linux

* hlds_linux

* ins

* date

* ns2

* rising world


rising world query port


rising world javaram


rising world


a

* rising world ports

* portipv6

* add ports to query raw

* add Rising World Query

* fix rising world game mode

* update 7 Days to Die

* port3

* increased sdtd glibc to 2.27

* corrected starbound ports location

* starbound

* added new SteamCMD error code

* Master server check if query raw

* Stationeers

* stationeers

* webadmin

* added extra query ports for ts3


a

* add teamspeak3 query

* add ts3 query details

* ts3 version

* queryport reverts back once gamedig finished

* added telnetport to ts3

* fix TS3 bug causing shutdown when starting debug

the fix was running and killing a running server

* show start parameters for ts3

* tower unite

* terraria

* terraria

* ss command in dev-query-raw


info_messages.sh

* ut4 and others

* more updates

* soldat

* col vint

* pvr query port


tab

* pvr query type tcp

* pvr gameport+400

* changed to shortname

* unreal99

* ut99 beacon

* httpport

* ut2k4

* kf

* kf

* bug

* httpport

* httpport

* more kf ports

* lan port

* steammasterport

* kf

* ports

* ports

* ut2k4

* ut2k4

* lanport

* lanport

* ro

* ro

* kf2

* httpport

* update naming

* ut3

* ut3

* ut3

* mom

* mom

* reshuffle

* sort list

* function re-shuffle

* merge info_parms and info_config into info_game.sh


a

* updated source filters

* added ac to edit ports array

* Revert "updated source filters"

This reverts commit e8621eaed6d7b7f38fa3911858a4c28a0e4dcc18.

* spaces

* fix typo

* tidy

* re ordered ports edit array

* added java

* add bf1942

* Added Last Oasis

* corrected pc function name

* re ordered in alpha

* space

* remove space
Daniel Gibbs 4 lat temu
rodzic
commit
6521320df1
33 zmienionych plików z 1531 dodań i 1362 usunięć
  1. 1 1
      lgsm/config-default/config-lgsm/acserver/_default.cfg
  2. 3 3
      lgsm/config-default/config-lgsm/avserver/_default.cfg
  3. 1 0
      lgsm/config-default/config-lgsm/csgoserver/_default.cfg
  4. 3 1
      lgsm/config-default/config-lgsm/inssserver/_default.cfg
  5. 1 1
      lgsm/config-default/config-lgsm/pvrserver/_default.cfg
  6. 2 2
      lgsm/config-default/config-lgsm/rwserver/_default.cfg
  7. 1 1
      lgsm/config-default/config-lgsm/sdtdserver/_default.cfg
  8. 1 1
      lgsm/config-default/config-lgsm/ts3server/_default.cfg
  9. 1 1
      lgsm/data/serverlist.csv
  10. 1 1
      lgsm/functions/alert.sh
  11. 1 2
      lgsm/functions/check_ip.sh
  12. 3 0
      lgsm/functions/check_root.sh
  13. 7 2
      lgsm/functions/command_debug.sh
  14. 3 3
      lgsm/functions/command_details.sh
  15. 197 11
      lgsm/functions/command_dev_query_raw.sh
  16. 1 4
      lgsm/functions/command_monitor.sh
  17. 2 2
      lgsm/functions/command_postdetails.sh
  18. 1 1
      lgsm/functions/command_restart.sh
  19. 8 2
      lgsm/functions/command_start.sh
  20. 1 1
      lgsm/functions/command_stop.sh
  21. 1 1
      lgsm/functions/command_test_alert.sh
  22. 8 2
      lgsm/functions/core_dl.sh
  23. 3 8
      lgsm/functions/core_functions.sh
  24. 1 1
      lgsm/functions/fix_ts3.sh
  25. 9 1
      lgsm/functions/info_distro.sh
  26. 803 605
      lgsm/functions/info_game.sh
  27. 447 367
      lgsm/functions/info_messages.sh
  28. 0 332
      lgsm/functions/info_parms.sh
  29. 16 1
      lgsm/functions/query_gamedig.sh
  30. 1 1
      tests/tests_fctrserver.sh
  31. 1 1
      tests/tests_jc2server.sh
  32. 1 1
      tests/tests_mcserver.sh
  33. 1 1
      tests/tests_ts3server.sh

+ 1 - 1
lgsm/config-default/config-lgsm/acserver/_default.cfg

@@ -139,7 +139,7 @@ stopmode="2"
 # 4: gsquery
 # 5: tcp
 querymode="5"
-querytype=""
+querytype="assettocorsa"
 
 ## Console type
 consoleverbose="yes"

+ 3 - 3
lgsm/config-default/config-lgsm/avserver/_default.cfg

@@ -9,7 +9,7 @@
 #### Game Server Settings ####
 
 ## Predefined Parameters | https://docs.linuxgsm.com/configuration/start-parameters
-port="27000"
+
 # https://steamidfinder.com
 adminsteamid=""
 if [ -n "${adminsteamid}" ]; then
@@ -160,8 +160,8 @@ glibc="2.15"
 avdatapath="${serverfiles}/galaxy"
 avgalaxypath="${avdatapath}/${selfname}"
 systemdir="${serverfiles}"
-executabledir="${systemdir}"
-executable="./server.sh"
+executabledir="${systemdir}/bin"
+executable="./bin/AvorionServer"
 servercfgdir="${avgalaxypath}"
 servercfg="server.ini"
 servercfgdefault="server.ini"

+ 1 - 0
lgsm/config-default/config-lgsm/csgoserver/_default.cfg

@@ -26,6 +26,7 @@ ip="0.0.0.0"
 port="27015"
 clientport="27005"
 sourcetvport="27020"
+steamport="26901"
 defaultmap="de_mirage"
 maxplayers="16"
 tickrate="64"

+ 3 - 1
lgsm/config-default/config-lgsm/inssserver/_default.cfg

@@ -12,6 +12,8 @@
 ip="0.0.0.0"
 port="27102"
 queryport="27131"
+rconport="27015"
+rconpassword=""
 servername="LinuxGSM Server"
 defaultmap="Canyon"
 defaultscenario="Scenario_Crossing_Push_Security"
@@ -19,7 +21,7 @@ maxplayers="28"
 
 ## Server Parameters | https://docs.linuxgsm.com/configuration/start-parameters#additional-parameters
 ## Parameter Docs | https://sandstorm-support.newworldinteractive.com/hc/en-us/articles/360049211072-Server-Admin-Guide
-startparameters="${defaultmap}?Scenario=${defaultscenario}?MaxPlayers=${maxplayers} -Port=${port} -QueryPort=${queryport} -hostname='${servername}' -log"
+startparameters="${defaultmap}?Scenario=${defaultscenario}?MaxPlayers=${maxplayers} -Port=${port} -QueryPort=${queryport} -hostname='${servername}' -Rcon -RconPassword=${rconpassword} -RconListenPort=${rconport} -log"
 
 #### LinuxGSM Settings ####
 

+ 1 - 1
lgsm/config-default/config-lgsm/pvrserver/_default.cfg

@@ -139,7 +139,7 @@ stopmode="2"
 # 3: gamedig
 # 4: gsquery
 # 5: tcp
-querymode="1"
+querymode="5"
 querytype=""
 
 ## Console type

+ 2 - 2
lgsm/config-default/config-lgsm/rwserver/_default.cfg

@@ -135,8 +135,8 @@ stopmode="3"
 # 3: gamedig
 # 4: gsquery
 # 5: tcp
-querymode="1"
-querytype=""
+querymode="2"
+querytype="protocol-valve"
 
 ## Console type
 consoleverbose="yes"

+ 1 - 1
lgsm/config-default/config-lgsm/sdtdserver/_default.cfg

@@ -146,7 +146,7 @@ consoleinteract="no"
 # Do not edit
 gamename="7 Days To Die"
 engine="unity3d"
-glibc="2.15"
+glibc="2.27"
 
 #### Directories ####
 # Edit with care

+ 1 - 1
lgsm/config-default/config-lgsm/ts3server/_default.cfg

@@ -123,7 +123,7 @@ stopmode="2"
 # 4: gsquery
 # 5: tcp
 querymode="5"
-querytype=""
+querytype="teamspeak3"
 
 ## Console type
 consoleverbose="yes"

+ 1 - 1
lgsm/data/serverlist.csv

@@ -108,8 +108,8 @@ ut2k4,ut2k4server,Unreal Tournament 2004
 ut3,ut3server,Unreal Tournament 3
 ut99,ut99server,Unreal Tournament 99
 vh,vhserver,Valheim
-vs,vsserver,Vampire Slayer
 vints,vintsserver,Vintage Story
+vs,vsserver,Vampire Slayer
 wet,wetserver,Wolfenstein: Enemy Territory
 wf,wfserver,Warfork
 wmc,wmcserver,WaterfallMC

+ 1 - 1
lgsm/functions/alert.sh

@@ -11,7 +11,7 @@ functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")"
 # Used with email alerts.
 fn_alert_log(){
 	info_distro.sh
-	info_config.sh
+	info_game.sh
 	info_messages.sh
 	if [ -f "${alertlog}" ]; then
 		rm -f "${alertlog:?}"

+ 1 - 2
lgsm/functions/check_ip.sh

@@ -8,8 +8,7 @@
 
 functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")"
 
-info_config.sh
-info_parms.sh
+info_game.sh
 
 if [ ! -f "/bin/ip" ]; then
 	ipcommand="/sbin/ip"

+ 3 - 0
lgsm/functions/check_root.sh

@@ -12,6 +12,9 @@ if [ "$(whoami)" = "root" ]; then
 		fn_print_fail_nl "Do NOT run this script as root!"
 		if [ -d "${lgsmlogdir}" ]; then
 			fn_script_log_fatal "${selfname} attempted to run as root."
+		else
+			# Forces exit code is log does not yet exist.
+			exitcode=1
 		fi
 		core_exit.sh
 	fi

+ 7 - 2
lgsm/functions/command_debug.sh

@@ -27,7 +27,7 @@ fn_lockfile_trap(){
 check.sh
 fix.sh
 info_distro.sh
-info_config.sh
+info_game.sh
 # NOTE: Check if works with server without parms. Could be intergrated in to info_parms.sh.
 fn_print_header
 {
@@ -104,7 +104,12 @@ echo "${port}" >> "${lockdir}/${selfname}.lock"
 fn_script_log_info "Lockfile generated"
 fn_script_log_info "${lockdir}/${selfname}.lock"
 
-cd "${executabledir}" || exit
+if [ "${shortname}" == "av" ]; then
+	cd "${systemdir}" || exit
+else
+	cd "${executabledir}" || exit
+fi
+
 # Note: do not add double quotes to ${executable} ${startparameters}.
 if [ "${engine}" == "source" ]||[ "${engine}" == "goldsrc" ]; then
 	${executable} ${startparameters} -debug

+ 3 - 3
lgsm/functions/command_details.sh

@@ -12,9 +12,8 @@ fn_firstcommand_set
 
 # Run checks and gathers details to display.
 check.sh
-info_config.sh
-info_parms.sh
 info_distro.sh
+info_game.sh
 info_messages.sh
 if [ "${querymode}" == "2" ]||[ "${querymode}" == "3" ]; then
 	for queryip in "${queryips[@]}"; do
@@ -31,9 +30,10 @@ fn_info_message_gameserver
 fn_info_message_script
 fn_info_message_backup
 # Some game servers do not have parms.
-if [ "${shortname}" != "ts3" ]&&[ "${shortname}" != "jc2" ]&&[ "${shortname}" != "dst" ]&&[ "${shortname}" != "pz" ]&&[ "${engine}" != "renderware" ]; then
+if [ "${shortname}" != "jc2" ]&&[ "${shortname}" != "dst" ]&&[ "${shortname}" != "pz" ]&&[ "${engine}" != "renderware" ]; then
 	fn_info_message_commandlineparms
 fi
+fn_info_message_ports_edit
 fn_info_message_ports
 fn_info_message_select_engine
 fn_info_message_statusbottom

+ 197 - 11
lgsm/functions/command_dev_query_raw.sh

@@ -11,25 +11,204 @@ functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")"
 fn_firstcommand_set
 
 check.sh
-info_config.sh
-info_parms.sh
+info_game.sh
+info_distro.sh
+info_messages.sh
 
 echo -e ""
-echo -e "Query Port - Raw Output"
+echo -e "${lightgreen}Query IP Addresses${default}"
 echo -e "=================================================================="
 echo -e ""
-echo -e "QUERY IP"
 for queryip in "${queryips[@]}"; do
 	echo -e "${queryip}"
 done
+echo -e ""
+echo -e "${lightgreen}Game Server Ports${default}"
+echo -e "=================================================================="
+{
+echo -e "${lightblue}Port Name \tPort Number \tStatus \tTCP \tUDP${default}"
+if [ -v port ]; then
+	echo -e "Game: \t${port} \t$(ss -tupl|grep ${port}|wc -l) \t$(ss -tupl|grep ${port}|grep tcp|awk '{ print $2 }') \t$(ss -tupl|grep ${port}|grep udp|awk '{ print $2 }')"
+else
+	echo -e "Game:"
+fi
+if [ "${shortname}" == "rw" ]; then
+	if [ -v port2 ]; then
+		echo -e "Game+1: \t${port2} \t$(ss -tupl|grep ${port}|wc -l) \t$(ss -tupl|grep ${port2}|grep tcp|awk '{ print $2 }') \t$(ss -tupl|grep ${port2}|grep udp|awk '{ print $2 }')"
+	else
+		echo -e "Game+1:"
+	fi
+
+	if [ -v port3 ]; then
+		echo -e "Game+2: \t${port3} \t$(ss -tupl|grep ${port}|wc -l) \t$(ss -tupl|grep ${port3}|grep tcp|awk '{ print $2 }') \t$(ss -tupl|grep ${port3}|grep udp|awk '{ print $2 }')"
+	else
+		echo -e "Game+2:"
+	fi
+
+	if [ -v port4 ]; then
+		echo -e "Game+3: \t${port4} \t$(ss -tupl|grep ${port}|wc -l) \t$(ss -tupl|grep ${port4}|grep tcp|awk '{ print $2 }') \t$(ss -tupl|grep ${port4}|grep udp|awk '{ print $2 }')"
+	else
+		echo -e "Game+3:"
+	fi
+fi
+
+if [ -v port401 ]; then
+	echo -e "Game+400: \t${port401} \t$(ss -tupl|grep ${port401}|wc -l) \t$(ss -tupl|grep ${port401}|grep tcp|awk '{ print $2 }') \t$(ss -tupl|grep ${port401}|grep udp|awk '{ print $2 }')"
+else
+	echo -e "Game+400:"
+fi
+
+if [ -v portipv6 ]; then
+	echo -e "Game ipv6: \t${portipv6} \t$(ss -tupl|grep ${portipv6}|wc -l) \t$(ss -tupl|grep ${portipv6}|grep tcp|awk '{ print $2 }') \t$(ss -tupl|grep ${portipv6}|grep udp|awk '{ print $2 }')"
+else
+	echo -e "Game ipv6:"
+fi
+
+if [ -v queryport ]; then
+	echo -e "Query: \t${queryport} \t$(ss -tupl|grep ${queryport}|wc -l) \t$(ss -tupl|grep ${queryport}|grep tcp|awk '{ print $2 }') \t$(ss -tupl|grep ${queryport}|grep udp|awk '{ print $2 }')"
+else
+	echo -e "Query:"
+fi
+
+if [ -v httpport ]; then
+	echo -e "HTTP: \t${httpport} \t$(ss -tupl|grep ${httpport}|wc -l) \t$(ss -tupl|grep ${httpport}|grep tcp|awk '{ print $2 }') \t$(ss -tupl|grep ${httpport}|grep udp|awk '{ print $2 }')"
+else
+	echo -e "HTTP:"
+fi
+
+if [ -v httpqueryport ]; then
+	echo -e "HTTP Query: \t${httpqueryport} \t$(ss -tupl|grep ${httpqueryport}|wc -l) \t$(ss -tupl|grep ${httpqueryport}|grep tcp|awk '{ print $2 }') \t$(ss -tupl|grep ${httpqueryport}|grep udp|awk '{ print $2 }')"
+else
+	echo -e "HTTP Query:"
+fi
+
+
+if [ -v webadminport ]; then
+	echo -e "Web Admin: \t${webadminport} \t$(ss -tupl|grep ${webadminport}|wc -l) \t$(ss -tupl|grep ${webadminport}|grep tcp|awk '{ print $2 }') \t$(ss -tupl|grep ${webadminport}|grep udp|awk '{ print $2 }')"
+else
+	echo -e "Web Admin:"
+fi
+
+if [ -v clientport ]; then
+	echo -e "Client: \t${clientport} \t$(ss -tupl|grep ${clientport}|wc -l) \t$(ss -tupl|grep ${clientport}|grep tcp|awk '{ print $2 }') \t$(ss -tupl|grep ${clientport}|grep udp|awk '{ print $2 }')"
+else
+	echo -e "Client:"
+fi
+
+if [ -v rconport ]; then
+	echo -e "RCON: \t${rconport} \t$(ss -tupl|grep ${rconport}|wc -l) \t$(ss -tupl|grep ${rconport}|grep tcp|awk '{ print $2 }') \t$(ss -tupl|grep ${rconport}|grep udp|awk '{ print $2 }')"
+else
+	echo -e "RCON:"
+fi
+
+if [ -v rawport ]; then
+	echo -e "RAW UDP Socket: \t${rawport} \t$(ss -tupl|grep ${rawport}|wc -l) \t$(ss -tupl|grep ${rawport}|grep tcp|awk '{ print $2 }') \t$(ss -tupl|grep ${rawport}|grep udp|awk '{ print $2 }')"
+else
+	echo -e "RAW UDP Socket:"
+fi
+
+if [ -v masterport ]; then
+	echo -e "Game: Master: \t${masterport} \t$(ss -tupl|grep ${masterport}|wc -l) \t$(ss -tupl|grep ${masterport}|grep tcp|awk '{ print $2 }') \t$(ss -tupl|grep ${masterport}|grep udp|awk '{ print $2 }')"
+else
+	echo -e "Game: Master:"
+fi
+
+if [ -v steamport ]; then
+	echo -e "Steam: \t${steamport} \t$(ss -tupl|grep ${steamport}|wc -l) \t$(ss -tupl|grep ${steamport}|grep tcp|awk '{ print $2 }') \t$(ss -tupl|grep ${steamport}|grep udp|awk '{ print $2 }')"
+else
+	echo -e "Steam:"
+fi
+
+if [ -v steamauthport ]; then
+	echo -e "Steam: Auth: \t${steamauthport} \t$(ss -tupl|grep ${steamauthport}|wc -l) \t$(ss -tupl|grep ${steamauthport}|grep tcp|awk '{ print $2 }') \t$(ss -tupl|grep ${steamauthport}|grep udp|awk '{ print $2 }')"
+else
+	echo -e "Steam: Auth:"
+fi
+
+if [ -v steammasterport ]; then
+	echo -e "Steam: Master: \t${steammasterport} \t$(ss -tupl|grep ${steammasterport}|wc -l) \t$(ss -tupl|grep ${steammasterport}|grep tcp|awk '{ print $2 }') \t$(ss -tupl|grep ${steammasterport}|grep udp|awk '{ print $2 }')"
+else
+	echo -e "Steam: Master:"
+fi
+
+if [ -v steamqueryport ]; then
+	echo -e "Steam: Query: \t${steamqueryport} \t$(ss -tupl|grep ${steamqueryport}|wc -l) \t$(ss -tupl|grep ${steamqueryport}|grep tcp|awk '{ print $2 }') \t$(ss -tupl|grep ${steamqueryport}|grep udp|awk '{ print $2 }')"
+else
+	echo -e "Steam: Query:"
+fi
+if [ -v beaconport ]; then
+	echo -e "Beacon: \t${beaconport} \t$(ss -tupl|grep ${beaconport}|wc -l) \t$(ss -tupl|grep ${beaconport}|grep tcp|awk '{ print $2 }') \t$(ss -tupl|grep ${beaconport}|grep udp|awk '{ print $2 }')"
+else
+	echo -e "Beacon:"
+fi
+
+if [ -v appport ]; then
+	echo -e "App: \t${appport} \t$(ss -tupl|grep ${appport}|wc -l) \t$(ss -tupl|grep ${appport}|grep tcp|awk '{ print $2 }') \t$(ss -tupl|grep ${appport}|grep udp|awk '{ print $2 }')"
+else
+	echo -e "App:"
+fi
+
+if [ -v telnetport ]; then
+	echo -e "Telnet: \t${telnetport} \t$(ss -tupl|grep ${telnetport}|wc -l) \t$(ss -tupl|grep ${telnetport}|grep tcp|awk '{ print $2 }') \t$(ss -tupl|grep ${telnetport}|grep udp|awk '{ print $2 }')"
+else
+	echo -e "Telnet:"
+fi
+
+if [ -v sourcetvport ]; then
+	echo -e "SourceTV: \t${sourcetvport} \t$(ss -tupl|grep ${sourcetvport}|wc -l) \t$(ss -tupl|grep ${sourcetvport}|grep tcp|awk '{ print $2 }') \t$(ss -tupl|grep ${sourcetvport}|grep udp|awk '{ print $2 }')"
+else
+	echo -e "SourceTV:"
+fi
+
+if [ -v fileport ]; then
+	echo -e "File: \t${fileport} \t$(ss -tupl|grep ${fileport}|wc -l) \t$(ss -tupl|grep ${fileport}|grep tcp|awk '{ print $2 }') \t$(ss -tupl|grep ${fileport}|grep udp|awk '{ print $2 }')"
+else
+	echo -e "File:"
+fi
+
+if [ -v udplinkport ]; then
+	echo -e "UDP Link: \t${udplinkport} \t$(ss -tupl|grep ${udplinkport}|wc -l) \t$(ss -tupl|grep ${udplinkport}|grep tcp|awk '{ print $2 }') \t$(ss -tupl|grep ${udplinkport}|grep udp|awk '{ print $2 }')"
+else
+	echo -e "UDP Link:"
+fi
+
+if [ -v voiceport ]; then
+	echo -e "Voice: \t${voiceport} \t$(ss -tupl|grep ${voiceport}|wc -l) \t$(ss -tupl|grep ${voiceport}|grep tcp|awk '{ print $2 }') \t$(ss -tupl|grep ${voiceport}|grep udp|awk '{ print $2 }')"
+else
+	echo -e "Voice:"
+fi
+
+if [ -v voiceunusedport ]; then
+	echo -e "Voice (Unused): \t${voiceunusedport} \t$(ss -tupl|grep ${voiceunusedport}|wc -l) \t$(ss -tupl|grep ${voiceunusedport}|grep tcp|awk '{ print $2 }') \t$(ss -tupl|grep ${voiceunusedport}|grep udp|awk '{ print $2 }')"
+else
+	echo -e "Voice (Unused):"
+fi
+
+if [ -v battleeyeport ]; then
+	echo -e "BattleEye: \t${battleeyeport} \t$(ss -tupl|grep ${battleeyeport}|wc -l) \t$(ss -tupl|grep ${battleeyeport}|grep tcp|awk '{ print $2 }') \t$(ss -tupl|grep ${battleeyeport}|grep udp|awk '{ print $2 }')"
+else
+	echo -e "BattleEye:"
+fi
+
+if [ -v statsport ]; then
+	echo -e "Stats: \t${battleeyeport} \t$(ss -tupl|grep ${statsport}|wc -l) \t$(ss -tupl|grep ${statsport}|grep tcp|awk '{ print $2 }') \t$(ss -tupl|grep ${statsport}|grep udp|awk '{ print $2 }')"
+else
+	echo -e "Stats:"
+fi
+
+} | column -s $'\t' -t
+echo -e ""
+echo -e "${lightgreen}SS Output${default}"
 echo -e "================================="
-echo -e "Ports"
-echo -e "================================="
+fn_info_message_ports
+echo -e ""
+echo -e "${lightgreen}Query Port - Raw Output${default}"
+echo -e "=================================================================="
 echo -e ""
 echo -e "PORT: ${port}"
 echo -e "QUERY PORT: ${queryport}"
 echo -e ""
-echo -e "Gamedig Raw Output"
+echo -e "${lightgreen}Gamedig Raw Output${default}"
 echo -e "================================="
 echo -e ""
 if [ ! "$(command -v gamedig 2>/dev/null)" ]; then
@@ -45,7 +224,7 @@ for queryip in "${queryips[@]}"; do
 	echo "${gamedigraw}" | jq
 done
 echo -e ""
-echo -e "gsquery Raw Output"
+echo -e "${lightgreen}gsquery Raw Output${default}"
 echo -e "================================="
 echo -e ""
 for queryip in "${queryips[@]}"; do
@@ -57,7 +236,7 @@ for queryip in "${queryips[@]}"; do
 	"${functionsdir}"/query_gsquery.py -a "${queryip}" -p "${queryport}" -e "${querytype}"
 done
 echo -e ""
-echo -e "TCP Raw Output"
+echo -e "${lightgreen}TCP Raw Output${default}"
 echo -e "================================="
 echo -e ""
 for queryip in "${queryips[@]}"; do
@@ -73,10 +252,10 @@ for queryip in "${queryips[@]}"; do
 	fi
 done
 echo -e ""
-echo -e "Game Port - Raw Output"
+echo -e "${lightgreen}Game Port - Raw Output${default}"
 echo -e "=================================================================="
 echo -e ""
-echo -e "TCP Raw Output"
+echo -e "${lightgreen}TCP Raw Output${default}"
 echo -e "================================="
 echo -e ""
 for queryip in "${queryips[@]}"; do
@@ -91,5 +270,12 @@ for queryip in "${queryips[@]}"; do
 		echo -e "TCP query FAIL"
 	fi
 done
+echo -e ""
+echo -e "${lightgreen}Steam Master Server Response${default}"
+echo -e "=================================================================="
+echo -e ""
+echo -e "Response: ${displaymasterserver}"
+echo -e ""
+
 exitcode=0
 core_exit.sh

+ 1 - 4
lgsm/functions/command_monitor.sh

@@ -74,12 +74,10 @@ fn_monitor_check_queryport(){
 		fn_script_log_info "Checking port: CHECKING"
 		if [ -n "${rconenabled}" ]&&[ "${rconenabled}" != "true" ]&&[ ${shortname} == "av" ]; then
 			fn_print_warn "Checking port: Unable to query, rcon is not enabled"
-			fn_print_warn_eol_nl
 			fn_script_log_warn "Checking port: Unable to query, rcon is not enabled"
 		else
 			fn_print_error "Checking port: Unable to query, queryport is not set"
 			fn_script_log_error "Checking port: Unable to query, queryport is not set"
-			fn_print_error_eol_nl
 		fi
 		core_exit.sh
 	fi
@@ -227,8 +225,7 @@ fn_monitor_loop(){
 monitorflag=1
 check.sh
 core_logs.sh
-info_config.sh
-info_parms.sh
+info_game.sh
 
 # query pre-checks
 fn_monitor_check_lockfile

+ 2 - 2
lgsm/functions/command_postdetails.sh

@@ -31,8 +31,7 @@ if [ "${exitbypass}" ]; then
 else
 	# Run checks and gathers details to display.
 	check.sh
-	info_config.sh
-	info_parms.sh
+	info_game.sh
 	info_distro.sh
 	info_messages.sh
 	for queryip in "${queryips[@]}"
@@ -54,6 +53,7 @@ else
 		if [ "${shortname}" != "jc2" ]&&[ "${shortname}" != "jc3" ]&&[ "${shortname}" != "dst" ]&&[ "${shortname}" != "pz" ]&&[ "${engine}" != "renderware" ]; then
 			fn_info_message_commandlineparms
 		fi
+		fn_info_message_ports_edit
 		fn_info_message_ports
 		fn_info_message_select_engine
 		fn_info_message_statusbottom

+ 1 - 1
lgsm/functions/command_restart.sh

@@ -10,7 +10,7 @@ commandaction="Restarting"
 functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")"
 fn_firstcommand_set
 
-info_config.sh
+info_game.sh
 exitbypass=1
 command_stop.sh
 command_start.sh

+ 8 - 2
lgsm/functions/command_start.sh

@@ -72,7 +72,13 @@ fn_start_tmux(){
 	echo "${version}" >> "${lockdir}/${selfname}.lock"
 	echo "${port}" >> "${lockdir}/${selfname}.lock"
 	fn_reload_startparameters
-	cd "${executabledir}" || exit
+
+	if [ "${shortname}" == "av" ]; then
+		cd "${systemdir}" || exit
+	else
+		cd "${executabledir}" || exit
+	fi
+
 	tmux new-session -d -x "${sessionwidth}" -y "${sessionheight}" -s "${sessionname}" "${preexecutable} ${executable} ${startparameters}" 2> "${lgsmlogdir}/.${selfname}-tmux-error.tmp"
 
 	# Create logfile.
@@ -185,7 +191,7 @@ fi
 if [ -z "${fixbypass}" ]; then
 	fix.sh
 fi
-info_config.sh
+info_game.sh
 core_logs.sh
 
 # Will check for updates is updateonstart is yes.

+ 1 - 1
lgsm/functions/command_stop.sh

@@ -269,7 +269,7 @@ fn_stop_pre_check(){
 check.sh
 fn_print_dots "${servername}"
 
-info_config.sh
+info_game.sh
 fn_stop_pre_check
 # Remove lockfile.
 if [ -f "${lockdir}/${selfname}.lock" ]; then

+ 1 - 1
lgsm/functions/command_test_alert.sh

@@ -12,7 +12,7 @@ fn_firstcommand_set
 
 fn_print_dots "${servername}"
 check.sh
-info_config.sh
+info_game.sh
 alert="test"
 alert.sh
 

+ 8 - 2
lgsm/functions/core_dl.sh

@@ -92,9 +92,14 @@ fn_dl_steamcmd(){
 		if [ -n "$(grep -i "Error!" "${steamcmdlog}" | tail -1)" ]&&[ "$(grep -ic "Error!" "${steamcmdlog}")" -ge "${counter}" ] ; then
 			# Not enough space.
 			if [ -n "$(grep "0x202" "${steamcmdlog}" | tail -1)" ]; then
-				fn_print_failure_nl "${commandaction} ${selfname}: ${remotelocation}: Not enough space to download server files"
-				fn_script_log_fatal "${commandaction} ${selfname}: ${remotelocation}: Not enough space to download server files"
+				fn_print_failure_nl "${commandaction} ${selfname}: ${remotelocation}: Not enough disk space to download server files"
+				fn_script_log_fatal "${commandaction} ${selfname}: ${remotelocation}: Not enough disk space to download server files"
 				core_exit.sh
+				# Not enough space.
+			elif [ -n "$(grep "0x212" "${steamcmdlog}" | tail -1)" ]; then
+					fn_print_failure_nl "${commandaction} ${selfname}: ${remotelocation}: Not enough disk space to download server files"
+					fn_script_log_fatal "${commandaction} ${selfname}: ${remotelocation}: Not enough disk space to download server files"
+					core_exit.sh
 			# Need tp purchase game.
 			elif [ -n "$(grep "No subscription" "${steamcmdlog}" | tail -1)" ]; then
 				fn_print_failure_nl "${commandaction} ${selfname}: ${remotelocation}: Steam account does not have a license for the required game"
@@ -116,6 +121,7 @@ fn_dl_steamcmd(){
 				fn_script_log_error "${commandaction} ${selfname}: ${remotelocation}: Update required but not completed - check network"
 			else
 				fn_print_error2_nl "${commandaction} ${selfname}: ${remotelocation}: Unknown error occured"
+				echo -en "Please provide content log to LinuxGSM developers https://linuxgsm.com/steamcmd-error"
 				fn_script_log_error "${commandaction} ${selfname}: ${remotelocation}: Unknown error occured"
 			fi
 		elif [ "${exitcode}" != "0" ]; then

+ 3 - 8
lgsm/functions/core_functions.sh

@@ -513,17 +513,12 @@ fn_fetch_function
 
 # Info
 
-info_stats.sh(){
-functionfile="${FUNCNAME[0]}"
-fn_fetch_function
-}
-
-info_config.sh(){
+info_distro.sh(){
 functionfile="${FUNCNAME[0]}"
 fn_fetch_function
 }
 
-info_distro.sh(){
+info_game.sh(){
 functionfile="${FUNCNAME[0]}"
 fn_fetch_function
 }
@@ -538,7 +533,7 @@ functionfile="${FUNCNAME[0]}"
 fn_fetch_function
 }
 
-info_parms.sh(){
+info_stats.sh(){
 functionfile="${FUNCNAME[0]}"
 fn_fetch_function
 }

+ 1 - 1
lgsm/functions/fix_ts3.sh

@@ -17,7 +17,7 @@ fi
 
 # Fixes: failed to register local accounting service: No such file or directory.
 accountingfile="/dev/shm/7gbhujb54g8z9hu43jre8"
-if [ -f "${accountingfile}" ]; then
+if [ -f "${accountingfile}" ]&&[ "${status}" == "0" ]; then
 	# Check permissions for the file if the current user owns it, if not exit.
 	if [ "$( stat -c %U ${accountingfile})" == "$(whoami)" ]; then
 		fixname="Delete file ${accountingfile}"

+ 9 - 1
lgsm/functions/info_distro.sh

@@ -11,6 +11,11 @@ functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")"
 ### Game Server pid
 if [ "${status}" == "1" ]; then
 	gameserverpid=$(tmux list-sessions -F "#{session_name} #{pane_pid}" | grep "^${sessionname} " | awk '{print $NF}')
+	if [ "${engine}" == "source" ]; then
+		srcdslinuxpid=$(ps -ef | grep -v grep | grep "${gameserverpid}" | grep srcds_linux | awk '{print $2}')
+	elif [ "${engine}" == "goldsrc" ]; then
+		hldslinuxpid=$(ps -ef | grep -v grep | grep "${gameserverpid}" | grep hlds_linux | awk '{print $2}')
+	fi
 fi
 ### Distro information
 
@@ -268,7 +273,7 @@ fi
 # Steam Master Server - checks if detected by master server.
 if [ "$(command -v jq 2>/dev/null)" ]; then
 	if [ "${ip}" ]&&[ "${port}" ]; then
-		if [ "${steammaster}" == "true" ]; then
+		if [ "${steammaster}" == "true" ]||[ ${commandname} == "DEV-QUERY-RAW" ]; then
 			# Will query server IP addresses first.
 			for queryip in "${queryips[@]}"; do
 				masterserver="$(curl --connect-timeout 10 -m 3 -s 'https://api.steampowered.com/ISteamApps/GetServersAtAddress/v0001?addr='${queryip}':'${port}'&format=json' | jq '.response.servers[]|.addr' | wc -l 2>/dev/null)"
@@ -292,3 +297,6 @@ if [ "${appid}" ]; then
 		glibc="2.14"
 	fi
 fi
+
+# Gather Port Info using ss
+ssinfo="$(ss -tuplwn)"

Plik diff jest za duży
+ 803 - 605
lgsm/functions/info_game.sh


Plik diff jest za duży
+ 447 - 367
lgsm/functions/info_messages.sh


+ 0 - 332
lgsm/functions/info_parms.sh

@@ -1,332 +0,0 @@
-#!/bin/bash
-# LinuxGSM info_parms.sh module
-# Author: Daniel Gibbs
-# Contributors: http://linuxgsm.com/contrib
-# Website: https://linuxgsm.com
-# Description: If specific parms are not set then this will be displayed in details.
-
-functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")"
-
-## Examples of filtering to get info from config files
-# sed 's/foo//g' - remove foo
-# tr -cd '[:digit:]' leave only digits
-# tr -d '=\"; ' remove selected charectors =\";
-# grep -v "foo" filter out lines that contain foo
-
-unavailable="${red}UNAVAILABLE${default}"
-zero="${red}0${default}"
-
-fn_info_parms_ark(){
-	port=${port:-"0"}
-	queryport=${queryport:-"0"}
-	rconport=${rconport:-"0"}
-	maxplayers=${maxplayers:-"0"}
-}
-
-fn_info_parms_barotrauma(){
-	port=${port:-"0"}
-	queryport=${queryport:-"0"}
-}
-
-fn_info_parms_cod(){
-	defaultmap=${defaultmap:-"NOT SET"}
-	maxplayers=${maxplayers:-"0"}
-	port=${port:-"0"}
-	queryport=${port:-"0"}
-}
-
-fn_info_parms_dst(){
-	sharding=${sharding:-"NOT SET"}
-	master=${master:-"NOT SET"}
-	shard=${shard:-"NOT SET"}
-	cluster=${cluster:-"NOT SET"}
-	cave=${cave:-"NOT SET"}
-}
-
-fn_info_parms_factorio(){
-	port=${port:-"0"}
-	rconport=${rconport:-"0"}
-	rconpassword=${rconpassword:-"NOT SET"}
-}
-
-fn_info_parms_hurtworld(){
-	servername=${servername:-"NOT SET"}
-	port=${port:-"0"}
-	queryport=${queryport:-"0"}
-	maxplayers=${maxplayers:-"0"}
-	defaultmap=${defaultmap:-"NOT SET"}
-	creativemode=${creativemode:-"NOT SET"}
-}
-
-fn_info_parms_inss(){
-	port=${port:-"0"}
-	queryport=${queryport:-"0"}
-	servername=${servername:-"NOT SET"}
-	serverpassword=${serverpassword:-"NOT SET"}
-	defaultmap=${defaultmap:-"NOT SET"}
-	defaultscenario=${defaultscenario:-"NOT SET"}
-	maxplayers=${maxplayers:-"0"}
-}
-
-fn_info_parms_jk2(){
-	queryport=${port}
-}
-
-fn_info_parms_kf2(){
-	queryport=${queryport:-"0"}
-	defaultmap=${defaultmap:-"NOT SET"}
-}
-
-fn_info_parms_lo(){
-	servername=${servername:-"NOT SET"}
-	port=${port:-"0"}
-	queryport=${queryport:-"0"}
-}
-
-fn_info_parms_mordhau(){
-	port=${port:-"0"}
-	queryport=${queryport:-"0"}
-	beaconport=${beaconport:-"0"}
-}
-
-fn_info_parms_mohaa(){
-	port=${port:-"0"}
-	queryport=${port:-"0"}
-	defaultmap=${defaultmap:-"NOT SET"}
-}
-
-fn_info_parms_mom(){
-	port=${port:-"7777"}
-	beaconport=${queryport:-"15000"}
-}
-
-fn_info_parms_mta(){
-	queryport=$((port + 123))
-}
-
-fn_info_parms_projectzomboid(){
-	adminpassword=${adminpassword:-"NOT SET"}
-  queryport=${port:-"0"}
-}
-
-fn_info_parms_quakeworld(){
-	port=${port:-"0"}
-	queryport=${port:-"0"}
-}
-
-fn_info_parms_quake2(){
-	port=${port:-"0"}
-	queryport=${port:-"0"}
-	defaultmap=${defaultmap:-"NOT SET"}
-}
-
-fn_info_parms_realvirtuality(){
-	port=${port:-"0"}
-	queryport=$((port + 1))
-}
-
-fn_info_parms_risingworld(){
-	servername=${servername:-"NOT SET"}
-	port=${port:-"0"}
-	httpqueryport=$((port - 1))
-}
-
-fn_info_parms_rtcw(){
-	port=${port:-"0"}
-	queryport="${port:-"0"}"
-	defaultmap=${defaultmap:-"NOT SET"}
-}
-
-fn_info_parms_rust(){
-	servername=${servername:-"NOT SET"}
-	port=${port:-"0"}
-	queryport=${port:-"0"}
-	appport=${appport:-"0"}
-	rconport=${rconport:-"0"}
-	gamemode=${gamemode:-"NOT SET"}
-	maxplayers=${maxplayers:-"0"}
-	rconpassword=${rconpassword:-"NOT SET"}
-	rconweb=${rconweb:-"NOT SET"}
-	tickrate=${tickrate:-"0"}
-	saveinterval=${saveinterval:-"0"}
-	serverlevel=${serverlevel:-"NOT SET"}
-	worldsize=${worldsize:-"0"}
-}
-
-fn_info_parms_samp(){
-	queryport=${port:-"0"}
-}
-
-fn_info_parms_sof2(){
-	port=${port:-"0"}
-	defaultmap=${defaultmap:-"NOT SET"}
-}
-
-fn_info_parms_source(){
-	defaultmap=${defaultmap:-"NOT SET"}
-	maxplayers=${maxplayers:-"0"}
-	port=${port:-"0"}
-	queryport=${port:-"0"}
-	clientport=${clientport:-"0"}
-}
-
-fn_info_parms_spark(){
-	defaultmap=${defaultmap:-"NOT SET"}
-	maxplayers=${maxplayers:-"0"}
-	port=${port:-"0"}
-	queryport=$((port + 1))
-	servername=${servername:-"NOT SET"}
-	serverpassword=${serverpassword:-"NOT SET"}
-	webadminuser=${webadminuser:-"NOT SET"}
-	webadminpass=${webadminpass:-"NOT SET"}
-	webadminport=${webadminport:-"0"}
-	mods=${mods:-"NOT SET"}
-}
-
-fn_info_parms_stickybots(){
-	port=${port:-"0"}
-	queryport=${queryport:-"0"}
-	servername=${servername:-"NOT SET"}
-	serverpassword=${serverpassword:-"NOT SET"}
-	defaultmap=${defaultmap:-"NOT SET"}
-	maxplayers=${maxplayers:-"0"}
-}
-
-fn_info_parms_sof2(){
-	port=${port:-"0"}
-	queryport=${port:-"0"}
-	defaultmap=${defaultmap:-"NOT SET"}
-}
-
-fn_info_parms_towerunite(){
-	port=${port:-"0"}
-	queryport=${queryport:-"0"}
-}
-
-fn_info_parms_teeworlds(){
-  queryport=${port:-"0"}
-}
-
-fn_info_parms_pavlovvr(){
-	port=${port:-"0"}
-	queryport=${queryport:-"0"}
-}
-
-fn_info_parms_unreal(){
-	defaultmap=${defaultmap:-"NOT SET"}
-	queryport=$((port + 1))
-}
-
-fn_info_parms_unreal2(){
-	defaultmap=${defaultmap:-"NOT SET"}
-	queryport=$((port + 1))
-}
-
-fn_info_parms_unreal3(){
-	port=${port:-"0"}
-	queryport=${queryport:-"0"}
-	defaultmap=${defaultmap:-"NOT SET"}
-}
-
-fn_info_parms_unturned(){
-	servername=${selfname:-"NOT SET"}
-	port=${port:-"0"}
-	queryport=$((port + 1))
-}
-
-fn_info_parms_ut(){
-	port=${port:-"0"}
-}
-
-fn_info_parms_vh(){
-	port=${port:-"0"}
-	if [ "${public}" != "0" ]; then
-		queryport=$((port + 1))
-	else
-		querymode="1"
-	fi
-	gameworld=${gameworld:-"NOT SET"}
-	serverpassword=${serverpassword:-"NOT SET"}
-	servername=${servername:-"NOT SET"}
-}
-
-fn_info_parms_wf(){
-	port=${port:-"0"}
-	queryport="${port:-"0"}"
-	webadminport=${webadminport:-"0"}
-}
-
-fn_info_parms_queryport(){
-	queryport="${port:-"0"}"
-}
-
-if [ "${shortname}" == "ark" ]; then
-	fn_info_parms_ark
-elif [ "${shortname}" == "arma3" ]; then
-	fn_info_parms_realvirtuality
-elif [ "${shortname}" == "bt" ]; then
-	fn_info_parms_barotrauma
-elif [ "${shortname}" == "cod" ]||[ "${shortname}" == "coduo" ]||[ "${engine}" == "iw2.0" ]||[ "${engine}" == "iw3.0" ]; then
-	fn_info_parms_cod
-elif [ "${shortname}" == "fctr" ]; then
-	fn_info_parms_factorio
-elif [ "${shortname}" == "inss" ]; then
-	fn_info_parms_inss
-elif [ "${shortname}" == "jk2" ]; then
-	fn_info_parms_jk2
-elif [ "${shortname}" == "kf2" ]; then
-	fn_info_parms_kf2
-elif [ "${shortname}" == "lo" ]; then
-	fn_info_parms_lo
-elif [ "${shortname}" == "mohaa" ]; then
-	fn_info_parms_mohaa
-elif [ "${shortname}" == "mom" ]; then
-	fn_info_parms_mom
-elif [ "${shortname}" == "pz" ]; then
-	fn_info_parms_projectzomboid
-elif [ "${shortname}" == "pvr" ]; then
-	fn_info_parms_pavlovvr
-elif [ "${shortname}" == "qw" ]; then
-	fn_info_parms_quakeworld
-elif [ "${shortname}" == "q2" ]||[ "${shortname}" == "q3" ]; then
-	fn_info_parms_quake2
-elif [ "${shortname}" == "rtcw" ]; then
-	fn_info_parms_rtcw
-elif [ "${shortname}" == "rust" ]; then
-	fn_info_parms_rust
-elif [ "${shortname}" == "samp" ]; then
-  fn_info_parms_samp
-elif [ "${shortname}" == "rw" ]; then
-	fn_info_parms_risingworld
-elif [ "${shortname}" == "sof2" ]; then
-	fn_info_parms_sof2
-elif [ "${shortname}" == "sbots" ]; then
-	fn_info_parms_stickybots
-elif [ "${engine}" == "source" ]||[ "${engine}" == "goldsrc" ]; then
-	fn_info_parms_source
-elif [ "${engine}" == "spark" ]; then
-	fn_info_parms_spark
-elif [ "${shortname}" == "tu" ]; then
-	fn_info_parms_towerunite
-elif [ "${shortname}" == "tw" ]; then
-	fn_info_parms_teeworlds
-elif [ "${shortname}" == "vh" ]; then
-	fn_info_parms_vh
-elif [ "${shortname}" == "mh" ]; then
-	fn_info_parms_mordhau
-elif [ "${shortname}" == "mta" ]; then
-	fn_info_parms_mta
-elif [ "${engine}" == "unreal" ]||[ "${engine}" == "unreal2" ]; then
-	fn_info_parms_unreal
-elif [ "${engine}" == "unreal3" ]; then
-	fn_info_parms_unreal3
-elif [ "${shortname}" == "unt" ]; then
-	fn_info_parms_unturned
-elif [ "${shortname}" == "ut" ]; then
-	fn_info_parms_ut
-elif [ "${shortname}" == "wf" ]; then
-	fn_info_parms_wf
-# for servers that have a missing queryport from the config
-elif [ "${shortname}" == "scpsl" ]||[ "${shortname}" == "scpslsm" ]; then
-	fn_info_parms_queryport
-fi

+ 16 - 1
lgsm/functions/query_gamedig.sh

@@ -14,6 +14,10 @@ if [ "$(command -v gamedig 2>/dev/null)" ]&&[ "$(command -v jq 2>/dev/null)" ];
 	# will bypass query if server offline.
 	check_status.sh
 	if [ "${status}" != "0" ]; then
+		# GameDig requires you use the voice port when querying.
+		if [ "${querytype}" == "teamspeak3" ]; then
+			queryport="${port}"
+		fi
 		# checks if query is working null = pass.
 		gamedigcmd=$(echo -e "gamedig --type \"${querytype}\" --host \"${queryip}\" --query_port \"${queryport}\"|jq")
 		gamedigraw=$(gamedig --type "${querytype}" --host "${queryip}" --query_port "${queryport}")
@@ -25,6 +29,10 @@ if [ "$(command -v gamedig 2>/dev/null)" ]&&[ "$(command -v jq 2>/dev/null)" ];
 			querystatus=$(echo "${gamedigraw}" | jq '.error|length')
 		fi
 
+		if [ "${querytype}" == "teamspeak3" ]; then
+			fn_info_game_ts3
+		fi
+
 		# server name.
 		gdname=$(echo "${gamedigraw}" | jq -re '.name')
 		if [ "${gdname}" == "null" ]; then
@@ -34,6 +42,8 @@ if [ "$(command -v gamedig 2>/dev/null)" ]&&[ "$(command -v jq 2>/dev/null)" ];
 		# numplayers.
 		if [ "${querytype}" == "minecraft" ]; then
 			gdplayers=$(echo "${gamedigraw}" | jq -re '.players | length-1')
+		elif [ "${querytype}" == "teamspeak3" ]; then
+			gdplayers=$(echo "${gamedigraw}" | jq -re '.raw.virtualserver_clientsonline')
 		else
 			gdplayers=$(echo "${gamedigraw}" | jq -re '.players | length')
 		fi
@@ -70,7 +80,12 @@ if [ "$(command -v gamedig 2>/dev/null)" ]&&[ "$(command -v jq 2>/dev/null)" ];
 		fi
 
 		# server version.
-		gdversion=$(echo "${gamedigraw}" | jq -re '.raw.version')
+		if [ "${querytype}" == "teamspeak3" ]; then
+			dversion=$(echo "${gamedigraw}" | jq -re '.raw.virtualserver_version')
+		else
+			gdversion=$(echo "${gamedigraw}" | jq -re '.raw.version')
+		fi
+
 		if [ "${gdversion}" == "null" ]||[ "${gdversion}" == "0" ]; then
 			unset gdversion
 		fi

+ 1 - 1
tests/tests_fctrserver.sh

@@ -923,7 +923,7 @@ echo -e ""
 echo -e "5.0 - Monitor Tests"
 echo -e "=================================================================="
 echo -e ""
-info_config.sh
+info_game.sh
 echo -e "Server IP - Port: ${ip}:${port}"
 echo -e "Server IP - Query Port: ${ip}:${queryport}"
 

+ 1 - 1
tests/tests_jc2server.sh

@@ -1082,7 +1082,7 @@ echo -e ""
 echo -e "5.0 - Monitor Tests"
 echo -e "=================================================================="
 echo -e ""
-info_config.sh
+info_game.sh
 echo -e "Server IP - Port: ${ip}:${port}"
 echo -e "Server IP - Query Port: ${ip}:${queryport}"
 

+ 1 - 1
tests/tests_mcserver.sh

@@ -945,7 +945,7 @@ echo -e ""
 echo -e "5.0 - Monitor Tests"
 echo -e "=================================================================="
 echo -e ""
-info_config.sh
+info_game.sh
 echo -e "Server IP - Port: ${ip}:${port}"
 echo -e "Server IP - Query Port: ${ip}:${queryport}"
 

+ 1 - 1
tests/tests_ts3server.sh

@@ -922,7 +922,7 @@ echo -e ""
 echo -e "5.0 - Monitor Tests"
 echo -e "=================================================================="
 echo -e ""
-info_config.sh
+info_game.sh
 echo -e "Server IP - Port: ${ip}:${port}"
 echo -e "Server IP - Query Port: ${ip}:${queryport}"
 

Niektóre pliki nie zostały wyświetlone z powodu dużej ilości zmienionych plików