Kaynağa Gözat

add Squad sections to command_details

adds map rotation mode & port information
Scarsz 9 yıl önce
ebeveyn
işleme
60ed162d95
1 değiştirilmiş dosya ile 23 ekleme ve 1 silme
  1. 23 1
      lgsm/functions/command_details.sh

+ 23 - 1
lgsm/functions/command_details.sh

@@ -173,6 +173,11 @@ fn_details_gameserver(){
 			echo -e "${blue}ASE:\t${default}${ase}"
 			echo -e "${blue}ASE:\t${default}${ase}"
 		fi
 		fi
 
 
+		# Random map rotation mode (Squad)
+		if [ -n "${randommapmode}"]; then
+			echo -e "${blue}Map rotation:\t${default}${randommapmode}"
+		fi
+
 		# Online status
 		# Online status
 		if [ "${status}" == "0" ]; then
 		if [ "${status}" == "0" ]; then
 			echo -e "${blue}Status:\t${red}OFFLINE${default}"
 			echo -e "${blue}Status:\t${red}OFFLINE${default}"
@@ -190,7 +195,7 @@ fn_details_script(){
 	# Service name:        ql-server
 	# Service name:        ql-server
 	# qlserver version:    150316
 	# qlserver version:    150316
 	# User:                lgsm
 	# User:                lgsm
-	# Email alert:  off
+	# Email alert:         off
 	# Update on start:     off
 	# Update on start:     off
 	# Location:            /home/lgsm/qlserver
 	# Location:            /home/lgsm/qlserver
 	# Config file:         /home/lgsm/qlserver/serverfiles/baseq3/ql-server.cfg
 	# Config file:         /home/lgsm/qlserver/serverfiles/baseq3/ql-server.cfg
@@ -656,6 +661,21 @@ fn_details_spark(){
 	} | column -s $'\t' -t
 	} | column -s $'\t' -t
 }
 }
 
 
+fn_details_squad(){
+	echo -e "netstat -atunp | grep SquadServer"
+	echo -e ""
+	{
+		echo -e "DESCRIPTION\tDIRECTION\tPORT\tPROTOCOL"
+		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 "> RCON\tINBOUND\t${rconport}\ttcp"
+	} | column -s $'\t' -t
+}
+
 fn_details_starbound(){
 fn_details_starbound(){
 	echo -e "netstat -atunp | grep starbound"
 	echo -e "netstat -atunp | grep starbound"
 	echo -e ""
 	echo -e ""
@@ -861,6 +881,8 @@ fn_display_details() {
 		fn_details_quake3
 		fn_details_quake3
 	elif [ "${gamename}" == "Quake Live" ]; then
 	elif [ "${gamename}" == "Quake Live" ]; then
 		fn_details_quakelive
 		fn_details_quakelive
+	elif [ "${gamename}" == "Squad"]; then
+		fn_details_squad
 	elif [ "${gamename}" == "TeamSpeak 3" ]; then
 	elif [ "${gamename}" == "TeamSpeak 3" ]; then
 		fn_details_teamspeak3
 		fn_details_teamspeak3
 	elif [ "${gamename}" == "Tower Unite" ]; then
 	elif [ "${gamename}" == "Tower Unite" ]; then