Daniel Gibbs 9 лет назад
Родитель
Сommit
b0d81bf857
2 измененных файлов с 5 добавлено и 0 удалено
  1. 2 0
      lgsm/functions/command_details.sh
  2. 3 0
      lgsm/functions/info_config.sh

+ 2 - 0
lgsm/functions/command_details.sh

@@ -840,6 +840,8 @@ fn_display_details() {
 		fn_details_factorio
 	elif [ "${gamename}" == "Hurtworld" ]; then
 		fn_details_hurtworld
+	elif [ "${gamename}" == "Project Cars" ]; then
+		fn_details_projectcars
 	elif [ "${gamename}" == "QuakeWorld" ]; then
 		fn_details_quake
 	elif [ "${gamename}" == "Quake 2" ]; then

+ 3 - 0
lgsm/functions/info_config.sh

@@ -257,12 +257,14 @@ fn_info_config_projectcars(){
 		maxplayers="${zero}"
 		port="${zero}"
 		queryport="${zero}"
+		steamport="${zero}"
 	else
 		servername=$(grep "name" "${servercfgfullpath}" | sed -e 's/^[ \t]*//g' -e '/^\//d' -e 's/name//g' | tr -d '=\";,:' | sed -e 's/^[ \t]*//' -e 's/[ \t]*$//')
 		serverpassword=$(grep "password" "${servercfgfullpath}" | sed -e 's/^[ \t]*//g' -e '/^\//d' -e 's/password//g' | tr -d '=\";,:' | sed -e 's/^[ \t]*//' -e 's/[ \t]*$//')
 		maxplayers=$(grep "maxPlayers" "${servercfgfullpath}" | grep -v "//" | tr -cd '[:digit:]')
 		port=$(grep "hostPort" "${servercfgfullpath}" | grep -v "//" | tr -cd '[:digit:]')
 		queryport=$(grep "queryPort" "${servercfgfullpath}" | grep -v "//" | tr -cd '[:digit:]')
+		steamport=$(grep "steamPort" "${servercfgfullpath}" | grep -v "//" | tr -cd '[:digit:]')
 
 		# Not Set
 		servername=${servername:-"NOT SET"}
@@ -270,6 +272,7 @@ fn_info_config_projectcars(){
 		maxplayers=${maxplayers:-"NOT SET"}
 		port=${port:-"NOT SET"}
 		queryport=${queryport:-"NOT SET"}
+		steamport=${steamport:-"NOT SET"}
 	fi
 }