Explorar el Código

added port for ET

Daniel Gibbs hace 9 años
padre
commit
e79e40ecf9
Se han modificado 1 ficheros con 4 adiciones y 1 borrados
  1. 4 1
      lgsm/functions/info_config.sh

+ 4 - 1
lgsm/functions/info_config.sh

@@ -189,11 +189,14 @@ fn_info_config_wolfensteinenemyterritory(){
 		servername="${unavailable}"
 		serverpassword="${unavailable}"
 		slots="${zero}"
+		port="27960"
 	else
+		port=$(grep "net_port" "${servercfgfullpath}" | grep -v "//" | tr -cd '[:digit:]')
 		rconpassword=$(grep "zmq_rcon_password" "${servercfgfullpath}" | sed -e 's/^[ \t]*//g' -e '/^\//d' -e 's/set zmq_rcon_password//g' | tr -d '=\";,:' | sed -e 's/^[ \t]*//g' -e '/^\//d' | xargs -0)
 		servername=$(grep "sv_hostname" "${servercfgfullpath}" | sed -e 's/^[ \t]*//g' -e '/^\//d' -e 's/set sv_hostname//g' | tr -d '=\";,:' | xargs -0)
 		serverpassword=$(grep "g_password" "${servercfgfullpath}" | sed -e 's/^[ \t]*//g' -e '/^\//d' -e 's/set g_password//g' | tr -d '=\";,:' | xargs -0)
-		slots=$(grep "sv_maxclients" "${servercfgfullpath}" | tr -cd '[:digit:]')
+		slots=$(grep "sv_maxclients" "${servercfgfullpath}" | grep -v "//" | tr -cd '[:digit:]')
+
 
 		# Not Set
 		rconpassword=${rconpassword:-"NOT SET"}