Browse Source

added more details to unreal 3

pull/1639/head
Daniel Gibbs 8 years ago
parent
commit
971505e10d
  1. 15
      lgsm/functions/info_config.sh

15
lgsm/functions/info_config.sh

@ -624,15 +624,26 @@ fn_info_config_unreal(){
fn_info_config_unreal3(){
if [ ! -f "${servercfgfullpath}" ]; then
servername="${unavailable}"
serverpassword="${unavailable}"
adminpassword="${unavailable}"
webadminenabled="${unavailable}"
webadminport="${zero}"
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 in UT3
serverpassword=$(grep "GamePassword" "${servercfgfullpath}" | sed -e 's/^[ \t]*//g' -e '/^#/d' -e 's/GamePassword//g' | tr -d '=\";,:' | sed -e 's/^[ \t]*//' -e 's/[ \t]*$//')
adminpassword=$(grep "AdminPassword" "${servercfgfullpath}" | sed -e 's/^[ \t]*//g' -e '/^#/d' -e 's/AdminPassword//g' | tr -d '=\";,:' | sed -e 's/^[ \t]*//' -e 's/[ \t]*$//')
maxplayers=$(grep "MaxPlayers" "${servercfgfullpath}" | sed -e 's/^[ \t]*//g' -e '/^#/d' -e 's/MaxPlayers//g' | tr -d '=\";,:' | sed -e 's/^[ \t]*//' -e 's/[ \t]*$//')
webadminenabled=$(grep "bEnabled" "${servercfgdir}"/* | sed -e 's/^[ \t]*//g' -e '/^#/d' -e 's/bEnabled//g' | tr -d '=\";,:' | sed -e 's/^[ \t]*//' -e 's/[ \t]*$//')
webadminport=$(grep "ListenPort" "${servercfgfullpath}" | grep -v "#" | tr -cd '[:digit:]')
# Not Set
servername=${servername:-"NOT SET"}
webadminpass=${webadminpass:-"NOT SET"}
serverpassword=${serverpassword:-"NOT SET"}
adminpassword=${adminpassword:-"NOT SET"}
webadminenabled=${webadminenabled:-"NOT SET"}
webadminport=${webadminport:-"0"}
maxplayers=${maxplayers:-"NOT SET"}
fi
}

Loading…
Cancel
Save