Explorar o código

remove irrelevant entry for Squad details, read RCON port from cfg file

Scarsz %!s(int64=9) %!d(string=hai) anos
pai
achega
1b38006b9d
Modificáronse 1 ficheiros con 1 adicións e 4 borrados
  1. 1 4
      lgsm/functions/command_details.sh

+ 1 - 4
lgsm/functions/command_details.sh

@@ -662,15 +662,12 @@ fn_details_spark(){
 }
 }
 
 
 fn_details_squad(){
 fn_details_squad(){
+	rconport=$(cat ${servercfgdir}/Rcon.cfg | grep "Port=" | cut -c6-) # obtain rcon port from file
 	echo -e "netstat -atunp | grep SquadServer"
 	echo -e "netstat -atunp | grep SquadServer"
 	echo -e ""
 	echo -e ""
 	{
 	{
 		echo -e "DESCRIPTION\tDIRECTION\tPORT\tPROTOCOL"
 		echo -e "DESCRIPTION\tDIRECTION\tPORT\tPROTOCOL"
 		echo -e "> Game\tINBOUND\t${port}\tudp"
 		echo -e "> Game\tINBOUND\t${port}\tudp"
-		# Don't do arithmetics if ever the port wasn't a numeric value
-		if [ "${port}" -eq "${port}" ]; then
-			echo -e "> RAW\tINBOUND\t$((port+1))\tudp"
-		fi
 		echo -e "> Query\tINBOUND\t${queryport}\tudp"
 		echo -e "> Query\tINBOUND\t${queryport}\tudp"
 		echo -e "> RCON\tINBOUND\t${rconport}\ttcp"
 		echo -e "> RCON\tINBOUND\t${rconport}\ttcp"
 	} | column -s $'\t' -t
 	} | column -s $'\t' -t