Browse Source

Improvements to boserver

pull/1323/head
Daniel Gibbs 8 years ago
parent
commit
688809a92d
  1. 10
      lgsm/functions/info_config.sh

10
lgsm/functions/info_config.sh

@ -562,17 +562,14 @@ fn_info_config_ballistic_overkill(){
queryport="${zero}" queryport="${zero}"
maxplayers="${unavailable}" maxplayers="${unavailable}"
gamemode="${unavailable}" gamemode="${unavailable}"
gameworld="${unavailable}"
else else
servername=$(grep "ServerName" "${servercfgfullpath}" | sed 's/^.*value="//' | cut -f1 -d"\"") servername=$(grep "ServerName" "${servercfgfullpath}" | sed 's/^.*ServerName="//' | cut -f1 -d"\"")
serverpassword=$(grep "ServerPassword" "${servercfgfullpath}" | sed 's/^.*value="//' | cut -f1 -d"\"") serverpassword=$(grep "Password" "${servercfgfullpath}" | sed 's/^.*Password="//' | cut -f1 -d"\"")
port=$(grep "ServerPort" "${servercfgfullpath}" | tr -cd '[:digit:]') port=$(grep "ServerPort" "${servercfgfullpath}" | tr -cd '[:digit:]')
queryport=$((port + 1)) queryport=$((port + 1))
maxplayers=$(grep "ServerMaxPlayerCount" "${servercfgfullpath}" | tr -cd '[:digit:]') maxplayers=$(grep "ServerMaxPlayerCount" "${servercfgfullpath}" | tr -cd '[:digit:]')
gamemode=$(grep "GameMode" "${servercfgfullpath}" | sed 's/^.*value="//' | cut -f1 -d"\"") gamemode=$(grep "GameMode" "${servercfgfullpath}" | sed 's/^.*GameMode="//' | cut -f1 -d"\"")
gameworld=$(grep "GameWorld" "${servercfgfullpath}" | sed 's/^.*value="//' | cut -f1 -d"\"")
# Not Set # Not Set
servername=${servername:-"NOT SET"} servername=${servername:-"NOT SET"}
serverpassword=${serverpassword:-"NOT SET"} serverpassword=${serverpassword:-"NOT SET"}
@ -580,7 +577,6 @@ fn_info_config_ballistic_overkill(){
queryport=${queryport:-"0"} queryport=${queryport:-"0"}
maxplayers=${maxplayers:-"NOT SET"} maxplayers=${maxplayers:-"NOT SET"}
gamemode=${gamemode:-"NOT SET"} gamemode=${gamemode:-"NOT SET"}
gameworld=${gameworld:-"NOT SET"}
fi fi
} }

Loading…
Cancel
Save