فهرست منبع

Moved UT3 Maxplayers to config from parms

Daniel Gibbs 8 سال پیش
والد
کامیت
b84bc54713
3فایلهای تغییر یافته به همراه14 افزوده شده و 31 حذف شده
  1. 1 2
      lgsm/config-default/config-lgsm/ut3server/_default.cfg
  2. 13 28
      lgsm/functions/info_config.sh
  3. 0 1
      lgsm/functions/info_parms.sh

+ 1 - 2
lgsm/config-default/config-lgsm/ut3server/_default.cfg

@@ -13,7 +13,6 @@ ip="0.0.0.0"
 port="7777"
 queryport="25300"
 defaultmap="VCTF-Suspense"
-maxplayers="32"
 game="UTGameContent.UTVehicleCTFGame_Content"
 mutators="" #"UTGame.UTMutator_Instagib,UTGame.UTMutator_LowGrav"
 isdedicated="true"
@@ -26,7 +25,7 @@ allowjoininprogress="true"
 ## Server Start Command | https://github.com/GameServerManagers/LinuxGSM/wiki/Start-Parameters#additional-parameters
 # Edit with care | List of game types and mutators : http://wiki.unrealadmin.org/FAQ:UT3
 fn_parms(){
-parms="server ${defaultmap}?Game=${game}?bIsDedicated=${isdedicated}?bIsLanMatch=${islanmatch}?bUsesStats=${usesstats}?bShouldAdvertise=${shouldadvertise}?PureServer=${pureserver}?bAllowJoinInProgress=${allowjoininprogress}?MaxPlayers=${maxplayers}?Mutator=${mutators} -port=${port} -queryport=${queryport} -multihome=${ip} -nohomedir -unattended -log=${gamelog} -ini=${servercfgfullpath}"
+parms="server ${defaultmap}?Game=${game}?bIsDedicated=${isdedicated}?bIsLanMatch=${islanmatch}?bUsesStats=${usesstats}?bShouldAdvertise=${shouldadvertise}?PureServer=${pureserver}?bAllowJoinInProgress=${allowjoininprogress}?Mutator=${mutators} -port=${port} -queryport=${queryport} -multihome=${ip} -nohomedir -unattended -log=${gamelog} -ini=${servercfgfullpath}"
 }
 
 #### LinuxGSM Settings ####

+ 13 - 28
lgsm/functions/info_config.sh

@@ -625,27 +625,15 @@ fn_info_config_unreal3(){
 	if [ ! -f "${servercfgfullpath}" ]; then
 		servername="${unavailable}"
 		webadminpass="${unavailable}"
+		maxplayers="${unavailable}"
 	else
 		servername=$(grep "ServerName" "${servercfgfullpath}" | sed -e 's/^[ \t]*//g' -e '/^#/d' -e 's/ServerName//g' | tr -d '=\";,:' | sed -e 's/^[ \t]*//' -e 's/[ \t]*$//')
-		webadminpass=$(grep "AdminPassword" "${servercfgfullpath}" | sed -e 's/^[ \t]*//g' -e '/^#/d' -e 's/AdminPassword//g' | tr -d '=\";,:' | sed -e 's/^[ \t]*//' -e 's/[ \t]*$//')
-
-		# Not Set
-		servername=${servername:-"NOT SET"}
-		webadminpass=${webadminpass:-"NOT SET"}
-	fi
-}
-
-fn_info_config_kf2(){
-	if [ ! -f "${servercfgfullpath}" ]; then
-		servername="${unavailable}"
-		webadminpass="${unavailable}"
-	else
-		servername=$(grep "ServerName" "${servercfgfullpath}" | sed -e 's/^[ \t]*//g' -e '/^#/d' -e 's/ServerName//g' | tr -d '=\";,:' | sed -e 's/^[ \t]*//' -e 's/[ \t]*$//')
-		webadminpass=$(grep "AdminPassword" "${servercfgfullpath}" | sed -e 's/^[ \t]*//g' -e '/^#/d' -e 's/AdminPassword//g' | tr -d '=\";,:' | sed -e 's/^[ \t]*//' -e 's/[ \t]*$//')
-
+		webadminpass=$(grep "AdminPassword" | sed -e 's/^[ \t]*//g' -e '/^#/d' -e 's/AdminPassword//g' | tr -d '=\";,:' | sed -e 's/^[ \t]*//' -e 's/[ \t]*$//')
+		maxplayers=$(grep "MaxPlayers" | sed -e 's/^[ \t]*//g' -e '/^#/d' -e 's/MaxPlayers//g' | tr -d '=\";,:' | sed -e 's/^[ \t]*//' -e 's/[ \t]*$//')
 		# Not Set
 		servername=${servername:-"NOT SET"}
 		webadminpass=${webadminpass:-"NOT SET"}
+		maxplayers=${maxplayers:-"NOT SET"}
 	fi
 }
 
@@ -818,18 +806,6 @@ elif [ "${engine}" == "dontstarve" ]; then
 # Factorio
 elif [ "${gamename}" == "Factorio" ]; then
 	fn_info_config_factorio
-# Killing Floor 2
-elif [ "${gamename}" == "Killing Floor 2" ]; then
-	fn_info_config_kf2
-# Minecraft
-elif [ "${engine}" == "lwjgl2" ]; then
-	fn_info_config_minecraft
-# Project Cars
-elif [ "${gamename}" == "Project Cars" ]; then
-	fn_info_config_projectcars
-# Project Zomboid
-elif [ "${engine}" == "projectzomboid" ]; then
-	fn_info_config_projectzomboid
 # QuakeWorld
 elif [ "${gamename}" == "QuakeWorld" ]; then
 	fn_info_config_quakeworld
@@ -842,6 +818,15 @@ elif [ "${gamename}" == "Quake 3: Arena" ]; then
 # Quake Live
 elif [ "${gamename}" == "Quake Live" ]; then
 	fn_info_config_quakelive
+# Minecraft
+elif [ "${engine}" == "lwjgl2" ]; then
+	fn_info_config_minecraft
+# Project Cars
+elif [ "${gamename}" == "Project Cars" ]; then
+	fn_info_config_projectcars
+# Project Zomboid
+elif [ "${engine}" == "projectzomboid" ]; then
+	fn_info_config_projectzomboid
 # ARMA 3
 elif [ "${engine}" == "realvirtuality" ]; then
 	fn_info_config_realvirtuality

+ 0 - 1
lgsm/functions/info_parms.sh

@@ -112,7 +112,6 @@ fn_info_parms_unreal3(){
 	port=${port:-"0"}
 	queryport=${queryport:-"0"}
 	defaultmap=${defaultmap:-"NOT SET"}
-	maxplayers=${maxplayers:-"0"}
 	serverpassword=${serverpassword:-"NOT SET"}
 	adminpassword=${adminpassword:-"NOT SET"}
 }