Browse Source

imroving UT3 & KF2 details

pull/1639/head
Daniel Gibbs 8 years ago
parent
commit
9ceb61574e
  1. 4
      lgsm/functions/info_config.sh
  2. 8
      lgsm/functions/info_messages.sh

4
lgsm/functions/info_config.sh

@ -633,8 +633,6 @@ fn_info_config_unreal3(){
webadminpass="${unavailable}" webadminpass="${unavailable}"
else 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]*$//') servername=$(grep "ServerName" "${servercfgfullpath}" | sed -e 's/^[ \t]*//g' -e '/^#/d' -e 's/ServerName//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]*$//') adminpassword=$(grep "AdminPassword" "${servercfgfullpath}" | sed -e 's/^[ \t]*//g' -e '/^#/d' -e 's/AdminPassword//g' | tr -d '=\";,:' | sed -e 's/^[ \t]*//' -e 's/[ \t]*$//')
port=$(grep "Port" "${servercfgdir}/UTEngine.ini" | sed -e 's/^[ \t]*//g' | grep "^Port" | grep -v "#" | tr -cd '[:digit:]') port=$(grep "Port" "${servercfgdir}/UTEngine.ini" | sed -e 's/^[ \t]*//g' | grep "^Port" | grep -v "#" | tr -cd '[:digit:]')
webadminenabled=$(grep "bEnabled" "${servercfgdir}/UTWeb.ini" | sed -e 's/^[ \t]*//g' -e '/^#/d' -e 's/bEnabled//g' | tr -d '=\";,:' | sed -e 's/^[ \t]*//' -e 's/[ \t]*$//') webadminenabled=$(grep "bEnabled" "${servercfgdir}/UTWeb.ini" | sed -e 's/^[ \t]*//g' -e '/^#/d' -e 's/bEnabled//g' | tr -d '=\";,:' | sed -e 's/^[ \t]*//' -e 's/[ \t]*$//')
@ -651,8 +649,6 @@ fn_info_config_unreal3(){
webadminport=${webadminport:-"0"} webadminport=${webadminport:-"0"}
webadminuser=${webadminuser:-"NOT SET"} webadminuser=${webadminuser:-"NOT SET"}
webadminpass=${webadminpass:-"NOT SET"} webadminpass=${webadminpass:-"NOT SET"}
fi fi
} }

8
lgsm/functions/info_messages.sh

@ -382,12 +382,16 @@ fn_info_message_ports(){
local ports_edit_array=( "avalanche" "Ballistic Overkill" "dontstarve" "idtech2" "idtech3" "idtech3_ql" "lwjgl2" "Project Cars" "projectzomboid" "quake" "refractor" "realvirtuality" "renderware" "seriousengine35" "teeworlds" "terraria" "unreal" "unreal2" "unreal3" "TeamSpeak 3" "Mumble" "7 Days To Die" ) local ports_edit_array=( "avalanche" "Ballistic Overkill" "dontstarve" "idtech2" "idtech3" "idtech3_ql" "lwjgl2" "Project Cars" "projectzomboid" "quake" "refractor" "realvirtuality" "renderware" "seriousengine35" "teeworlds" "terraria" "unreal" "unreal2" "unreal3" "TeamSpeak 3" "Mumble" "7 Days To Die" )
for port_edit in "${ports_edit_array[@]}" for port_edit in "${ports_edit_array[@]}"
do do
if [ "${engine}" == "${port_edit}" ]||[ "${gamename}" == "${port_edit}" ]; then if [ "${shortname}" == "ut3" ]; then
parmslocation="${servercfgdir}/UTEngine.ini\n${servercfgdir}/UTWeb.ini"
elif [ "${shortname}" == "kf2" ]; then
parmslocation="${servercfgdir}/LinuxServer-KFEngine.ini\n${servercfgdir}/KFWeb.ini"
elif [ "${engine}" == "${port_edit}" ]||[ "${gamename}" == "${port_edit}" ]; then
parmslocation="${servercfgfullpath}" parmslocation="${servercfgfullpath}"
fi fi
done done
# engines/games that require editing in the script file # engines/games that require editing in the script file
local ports_edit_array=( "goldsource" "Factorio" "Hurtworld" "iw3.0" "Rust" "spark" "source" "starbound" "unreal4" "realvirtuality") local ports_edit_array=( "goldsource" "Factorio" "Hurtworld" "iw3.0" "Rust" "spark" "source" "starbound" "unreal4" "realvirtuality")
for port_edit in "${ports_edit_array[@]}" for port_edit in "${ports_edit_array[@]}"
do do
if [ "${engine}" == "${port_edit}" ]||[ "${gamename}" == "${port_edit}" ]; then if [ "${engine}" == "${port_edit}" ]||[ "${gamename}" == "${port_edit}" ]; then

Loading…
Cancel
Save