Browse Source

feature/memoriesofmars

install config and info_config for command details added
pull/2911/head
scott 5 years ago
parent
commit
3c953ed570
  1. 20
      lgsm/functions/info_config.sh
  2. 7
      lgsm/functions/install_config.sh

20
lgsm/functions/info_config.sh

@ -457,6 +457,23 @@ fn_info_config_minecraft_bedrock(){
fi
}
fn_info_config_mofm(){
if [ ! -f "${servercfgfullpath}" ]; then
servername="${unavailable}"
serverpassword="${unavailable}"
maxplayers="${zero}"
else
servername=$(grep "Server Name:" "${servercfgfullpath}" | sed -e 's/^[ \t]*//g' -e '/^--/d' -e 's/Name//g' | tr -d '=\";,:' | sed -e 's/^[ \t]*//' -e 's/[ \t]*$//')
serverpassword=$(grep "Server Password:" "${servercfgfullpath}" | sed -e 's/^ *//g' -e '/^--/d' -e 's/Password//g' | tr -d '=\";,:' | sed -e 's/^[ \t]*//' -e 's/[ \t]*$//')
maxplayers=$(grep "MaxPlayers:" "${servercfgfullpath}" | grep -v "\--" | tr -cd '[:digit:]')
# Not Set
servername=${servername:-"NOT SET"}
serverpassword=${serverpassword:-"NOT SET"}
maxplayers=${maxplayers:-"0"}
fi
}
fn_info_config_onset(){
if [ ! -f "${servercfgfullpath}" ]; then
servername="${unavailable}"
@ -1511,6 +1528,9 @@ elif [ "${shortname}" == "kf2" ]; then
# Medal of Honor: Allied Assault
elif [ "${shortname}" == "mohaa" ]; then
fn_info_config_mohaa
# Memories of Mars
elif [ "${shortname}" == "mofm" ]; then
fn_info_config_mofm
# QuakeWorld
elif [ "${shortname}" == "qw" ]; then
fn_info_config_quakeworld

7
lgsm/functions/install_config.sh

@ -563,6 +563,13 @@ elif [ "${shortname}" == "mta" ]; then
fn_fetch_default_config
fn_default_config_remote
fn_list_config_locations
elif [ "${shotname}" == "mofm"];then
gamedirname="MemoriesofMars"
array_configs+=( DedicatedServerConfig.cfg)
fn_fetch_default_config
fn_default_config_remote
fn_set_config_vars
fn_list_config_locations
elif [ "${shortname}" == "mumble" ]; then
gamedirname="Mumble"
array_configs+=( murmur.ini )

Loading…
Cancel
Save