Browse Source

update naming

pull/3428/head
Daniel Gibbs 4 years ago
parent
commit
8808a007ad
  1. 277
      lgsm/functions/info_config.sh
  2. 54
      lgsm/functions/info_messages.sh
  3. 64
      lgsm/functions/info_parms.sh

277
lgsm/functions/info_config.sh

@ -15,7 +15,7 @@ functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")"
# cut -f1 -d "/" remove everything after /
fn_info_config_assettocorsa(){
fn_info_config_ac(){
if [ ! -f "${servercfgfullpath}" ]; then
httpport="${zero}"
port="${zero}"
@ -39,72 +39,6 @@ fn_info_config_assettocorsa(){
fi
}
fn_info_config_jc2(){
if [ ! -f "${servercfgfullpath}" ]; then
servername="${unavailable}"
serverpassword="${unavailable}"
maxplayers="${zero}"
port="${zero}"
queryport="${zero}"
else
servername=$(grep "Name" "${servercfgfullpath}" | sed -e 's/^[ \t]*//g' -e '/^--/d' -e 's/Name//g' | tr -d '=\";,:' | sed -e 's/^[ \t]*//' -e 's/[ \t]*$//')
serverdescription=$(grep "Description" "${servercfgfullpath}" | sed -e 's/^[ \t]*//g' -e '/^--/d' -e 's/Description//g' | tr -d '=\";,:' | sed -e 's/^[ \t]*//' -e 's/[ \t]*$//')
serverpassword=$(grep "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:]')
port=$(grep "BindPort" "${servercfgfullpath}" | grep -v "\--" | tr -cd '[:digit:]')
queryport="${port}"
configip=$(grep "BindIP" "${servercfgfullpath}" | sed -e 's/^[ \t]*//g' -e '/^--/d' -e 's/BindIP//g' | tr -d '=\";,:' | sed -e 's/^[ \t]*//' -e 's/[ \t]*$//')
ipsetinconfig=1
ipinconfigvar="BindIP"
# Not Set
servername=${servername:-"NOT SET"}
serverpassword=${serverpassword:-"NOT SET"}
maxplayers=${maxplayers:-"0"}
port=${port:-"0"}
queryport=${queryport:-"0"}
fi
}
fn_info_config_jc3(){
if [ ! -f "${servercfgfullpath}" ]; then
servername="${unavailable}"
serverdescription="${unavailable}"
serverpassword="${unavailable}"
maxplayers="${zero}"
port="${zero}"
queryPort="${zero}"
steamport="${zero}"
httpport="${zero}"
tickrate="${zero}"
else
servername=$(grep "name" "${servercfgfullpath}" | sed -e 's/^[ \t]*//g' -e '/^#/d' -e 's/name//g' | tr -d '=\";,:' | sed -e 's/^[ \t]*//' -e 's/[ \t]*$//')
serverdescription=$(grep "description" "${servercfgfullpath}" | sed -e 's/^[ \t]*//g' -e '/^#/d' -e 's/description//g' | tr -d '=\";,:' | sed -e 's/^[ \t]*//' -e 's/[ \t]*$//')
serverpassword=$(grep "password" "${servercfgfullpath}" | sed -e 's/^[ \t]*//g' -e '/^#/d' -e 's/password//g' | tr -d '=\";,:' | sed -e 's/^[ \t]*//' -e 's/[ \t]*$//')
maxplayers=$(grep "\"maxPlayers\"" "${servercfgfullpath}" | tr -cd '[:digit:]')
port=$(grep "\"port\"" "${servercfgfullpath}" | tr -cd '[:digit:]')
queryport=$(grep "\"queryPort\"" "${servercfgfullpath}" | tr -cd '[:digit:]')
steamport=$(grep "\"steamPort\"" "${servercfgfullpath}" | tr -cd '[:digit:]')
httpport=$(grep "\"httpPort\"" "${servercfgfullpath}" | tr -cd '[:digit:]')
tickrate=$(grep "\"maxTickRate\"" "${servercfgfullpath}" | tr -cd '[:digit:]')
configip=$(grep "host" "${servercfgfullpath}" | sed -e 's/^[ \t]*//g' -e '/^#/d' -e 's/host//g' | tr -d '=\";,:' | sed -e 's/^[ \t]*//' -e 's/[ \t]*$//')
ipsetinconfig=1
ipinconfigvar="host"
# Not Set
servername=${servername:-"NOT SET"}
serverdescription=${serverdescription:-"NOT SET"}
serverpassword=${serverpassword:-"NOT SET"}
maxplayers=${maxplayers=:-"0"}
port=${port=:-"0"}
queryport=${queryport=:-"0"}
steamport=${steamport=:-"0"}
httpport=${httpport=:-"0"}
tickrate=${tickrate=:-"0"}
fi
}
fn_info_config_ark(){
if [ ! -f "${servercfgfullpath}" ]; then
servername="${unavailable}"
@ -122,7 +56,7 @@ fn_info_config_ark(){
fi
}
fn_info_config_ballistic_overkill(){
fn_info_config_bo(){
if [ ! -f "${servercfgfullpath}" ]; then
servername="${unavailable}"
serverpassword="${unavailable}"
@ -145,7 +79,7 @@ fn_info_config_ballistic_overkill(){
fi
}
fn_info_config_barotrauma(){
fn_info_config_bt(){
if [ ! -f "${servercfgfullpath}" ]; then
servername="${unavailable}"
serverpassword="${unavailable}"
@ -309,7 +243,7 @@ fn_info_config_codwaw(){
fi
}
fn_info_config_dontstarve(){
fn_info_config_dst(){
if [ ! -f "${clustercfgfullpath}" ]; then
servername="${unavailable}"
serverpassword="${unavailable}"
@ -382,7 +316,7 @@ fn_info_config_eco(){
fi
}
fn_info_config_factorio(){
fn_info_config_fctr(){
if [ ! -f "${servercfgfullpath}" ]; then
servername="Factorio Server"
serverpassword="${unavailable}"
@ -408,7 +342,73 @@ fn_info_config_factorio(){
fi
}
fn_info_config_minecraft(){
fn_info_config_jc2(){
if [ ! -f "${servercfgfullpath}" ]; then
servername="${unavailable}"
serverpassword="${unavailable}"
maxplayers="${zero}"
port="${zero}"
queryport="${zero}"
else
servername=$(grep "Name" "${servercfgfullpath}" | sed -e 's/^[ \t]*//g' -e '/^--/d' -e 's/Name//g' | tr -d '=\";,:' | sed -e 's/^[ \t]*//' -e 's/[ \t]*$//')
serverdescription=$(grep "Description" "${servercfgfullpath}" | sed -e 's/^[ \t]*//g' -e '/^--/d' -e 's/Description//g' | tr -d '=\";,:' | sed -e 's/^[ \t]*//' -e 's/[ \t]*$//')
serverpassword=$(grep "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:]')
port=$(grep "BindPort" "${servercfgfullpath}" | grep -v "\--" | tr -cd '[:digit:]')
queryport="${port}"
configip=$(grep "BindIP" "${servercfgfullpath}" | sed -e 's/^[ \t]*//g' -e '/^--/d' -e 's/BindIP//g' | tr -d '=\";,:' | sed -e 's/^[ \t]*//' -e 's/[ \t]*$//')
ipsetinconfig=1
ipinconfigvar="BindIP"
# Not Set
servername=${servername:-"NOT SET"}
serverpassword=${serverpassword:-"NOT SET"}
maxplayers=${maxplayers:-"0"}
port=${port:-"0"}
queryport=${queryport:-"0"}
fi
}
fn_info_config_jc3(){
if [ ! -f "${servercfgfullpath}" ]; then
servername="${unavailable}"
serverdescription="${unavailable}"
serverpassword="${unavailable}"
maxplayers="${zero}"
port="${zero}"
queryPort="${zero}"
steamport="${zero}"
httpport="${zero}"
tickrate="${zero}"
else
servername=$(grep "name" "${servercfgfullpath}" | sed -e 's/^[ \t]*//g' -e '/^#/d' -e 's/name//g' | tr -d '=\";,:' | sed -e 's/^[ \t]*//' -e 's/[ \t]*$//')
serverdescription=$(grep "description" "${servercfgfullpath}" | sed -e 's/^[ \t]*//g' -e '/^#/d' -e 's/description//g' | tr -d '=\";,:' | sed -e 's/^[ \t]*//' -e 's/[ \t]*$//')
serverpassword=$(grep "password" "${servercfgfullpath}" | sed -e 's/^[ \t]*//g' -e '/^#/d' -e 's/password//g' | tr -d '=\";,:' | sed -e 's/^[ \t]*//' -e 's/[ \t]*$//')
maxplayers=$(grep "\"maxPlayers\"" "${servercfgfullpath}" | tr -cd '[:digit:]')
port=$(grep "\"port\"" "${servercfgfullpath}" | tr -cd '[:digit:]')
queryport=$(grep "\"queryPort\"" "${servercfgfullpath}" | tr -cd '[:digit:]')
steamport=$(grep "\"steamPort\"" "${servercfgfullpath}" | tr -cd '[:digit:]')
httpport=$(grep "\"httpPort\"" "${servercfgfullpath}" | tr -cd '[:digit:]')
tickrate=$(grep "\"maxTickRate\"" "${servercfgfullpath}" | tr -cd '[:digit:]')
configip=$(grep "host" "${servercfgfullpath}" | sed -e 's/^[ \t]*//g' -e '/^#/d' -e 's/host//g' | tr -d '=\";,:' | sed -e 's/^[ \t]*//' -e 's/[ \t]*$//')
ipsetinconfig=1
ipinconfigvar="host"
# Not Set
servername=${servername:-"NOT SET"}
serverdescription=${serverdescription:-"NOT SET"}
serverpassword=${serverpassword:-"NOT SET"}
maxplayers=${maxplayers=:-"0"}
port=${port=:-"0"}
queryport=${queryport=:-"0"}
steamport=${steamport=:-"0"}
httpport=${httpport=:-"0"}
tickrate=${tickrate=:-"0"}
fi
}
fn_info_config_mc(){
if [ ! -f "${servercfgfullpath}" ]; then
servername="${unavailable}"
rconpassword="${unavailable}"
@ -450,7 +450,7 @@ fn_info_config_minecraft(){
fi
}
fn_info_config_minecraft_bedrock(){
fn_info_config_mcb(){
if [ ! -f "${servercfgfullpath}" ]; then
servername="${unavailable}"
maxplayers="${zero}"
@ -566,7 +566,7 @@ fn_info_config_pstbs(){
numreservedslots=${numreservedslots:-"0"}
}
fn_info_config_projectcars(){
fn_info_config_pc(){
if [ ! -f "${servercfgfullpath}" ]; then
servername="${unavailable}"
serverpassword="${unavailable}"
@ -592,7 +592,7 @@ fn_info_config_projectcars(){
fi
}
fn_info_config_projectzomboid(){
fn_info_config_pz(){
if [ ! -f "${servercfgfullpath}" ]; then
servername="${unavailable}"
serverpassword="${unavailable}"
@ -618,7 +618,7 @@ fn_info_config_projectzomboid(){
fi
}
fn_info_config_quakeworld(){
fn_info_config_qw(){
if [ ! -f "${servercfgfullpath}" ]; then
rconpassword="${unavailable}"
servername="${unavailable}"
@ -637,7 +637,7 @@ fn_info_config_quakeworld(){
fi
}
fn_info_config_quake2(){
fn_info_config_q2(){
if [ ! -f "${servercfgfullpath}" ]; then
rconpassword="${unavailable}"
servername="${unavailable}"
@ -655,7 +655,7 @@ fn_info_config_quake2(){
fi
}
fn_info_config_quake3(){
fn_info_config_q3(){
if [ ! -f "${servercfgfullpath}" ]; then
rconpassword="${unavailable}"
servername="${unavailable}"
@ -696,7 +696,7 @@ fn_info_config_jk2(){
fi
}
fn_info_config_quakelive(){
fn_info_config_ql(){
if [ ! -f "${servercfgfullpath}" ]; then
rconpassword="${unavailable}"
servername="${unavailable}"
@ -752,7 +752,7 @@ fn_info_config_arma3(){
fi
}
fn_info_config_risingworld(){
fn_info_config_rw(){
if [ ! -f "${servercfgfullpath}" ]; then
servername="${unavailable}"
rconpassword="${unavailable}"
@ -866,7 +866,7 @@ fn_info_config_source(){
fi
}
fn_info_config_starbound(){
fn_info_config_sb(){
if [ ! -f "${servercfgfullpath}" ]; then
servername="${unavailable}"
queryenabled="${unavailable}"
@ -978,7 +978,7 @@ fn_info_config_samp(){
fi
}
fn_info_config_teeworlds(){
fn_info_config_tw(){
if [ ! -f "${servercfgfullpath}" ]; then
servername="unnamed server"
serverpassword="${unavailable}"
@ -1027,7 +1027,7 @@ fn_info_config_terraria(){
fi
}
fn_info_config_towerunite(){
fn_info_config_tu(){
if [ ! -f "${servercfgfullpath}" ]; then
servername="${unavailable}"
maxplayers="${zero}"
@ -1161,7 +1161,7 @@ fn_info_config_ut(){
fi
}
fn_info_config_warfork(){
fn_info_config_wf(){
if [ ! -f "${servercfgfullpath}" ]; then
rconpassword="${unavailable}"
servername="${unavailable}"
@ -1433,7 +1433,7 @@ fn_info_config_mta(){
fi
}
fn_info_config_wolfensteinenemyterritory(){
fn_info_config_wet(){
if [ ! -f "${servercfgfullpath}" ]; then
rconpassword="${unavailable}"
servername="${unavailable}"
@ -1463,7 +1463,7 @@ fn_info_config_wolfensteinenemyterritory(){
fi
}
fn_info_config_etlegacy(){
fn_info_config_etl(){
if [ ! -f "${servercfgfullpath}" ]; then
rconpassword="${unavailable}"
servername="${unavailable}"
@ -1493,7 +1493,7 @@ fn_info_config_etlegacy(){
fi
}
fn_info_config_wurmunlimited(){
fn_info_config_wurm(){
if [ ! -f "${servercfgfullpath}" ]; then
port="${zero}"
queryport="${zero}"
@ -1571,7 +1571,7 @@ fn_info_config_st(){
fi
}
fn_info_config_mordhau(){
fn_info_config_mh(){
if [ ! -f "${servercfgfullpath}" ]; then
servername="${unavailable}"
serverpassword="${unavailable}"
@ -1630,7 +1630,7 @@ fn_info_config_av() {
fi
}
fn_info_config_soldat(){
fn_info_config_sol(){
if [ ! -f "${servercfgfullpath}" ]; then
adminpassword="${unavailable}"
maxplayers="${unavailable}"
@ -1657,7 +1657,7 @@ fn_info_config_soldat(){
fi
}
fn_info_config_pavlovvr(){
fn_info_config_pvr(){
if [ ! -f "${servercfgfullpath}" ]; then
servername="${unavailable}"
maxplayers="${unavailable}"
@ -1694,7 +1694,7 @@ fn_info_config_col(){
fi
}
fn_info_config_vintagestory(){
fn_info_config_vints(){
if [ ! -f "${servercfgfullpath}" ]; then
servername="${unavailable}"
maxplayers="${unavailable}"
@ -1735,7 +1735,7 @@ fn_info_config_scpsl(){
fi
}
fn_info_config_waterfall(){
fn_info_config_wmc(){
if [ -f "${servercfgfullpath}" ]; then
servername=$(sed -e '/^listeners:/,/^[a-z]/!d' "${servercfgfullpath}" | sed -nr 's/^[ ]+motd: (.*)$/\1/p' | tr -d "'" | sed 's/&1//')
queryport=$(sed -nr 's/^[ -]+query_port: ([0-9]+)/\1/p' "${servercfgfullpath}")
@ -1758,15 +1758,17 @@ fn_info_config_waterfall(){
}
if [ "${shortname}" == "ac" ]; then
fn_info_config_assettocorsa
fn_info_config_ac
elif [ "${shortname}" == "ark" ]; then
fn_info_config_ark
elif [ "${shortname}" == "arma3" ]; then
fn_info_config_arma3
elif [ "${shortname}" == "av" ]; then
fn_info_config_av
elif [ "${shortname}" == "bo" ]; then
fn_info_config_ballistic_overkill
fn_info_config_bo
elif [ "${shortname}" == "bt" ]; then
fn_info_config_barotrauma
fn_info_config_bt
elif [ "${shortname}" == "bt1944" ]; then
fn_info_config_bt1944
elif [ "${shortname}" == "bf1942" ]; then
@ -1786,76 +1788,77 @@ elif [ "${shortname}" == "codwaw" ]; then
elif [ "${shortname}" == "col" ]; then
fn_info_config_col
elif [ "${shortname}" == "dst" ]; then
fn_info_config_dontstarve
fn_info_config_dst
elif [ "${shortname}" == "eco" ]; then
fn_info_config_eco
elif [ "${shortname}" == "etl" ]; then
fn_info_config_etl
elif [ "${shortname}" == "fctr" ]; then
fn_info_config_factorio
fn_info_config_fctr
elif [ "${shortname}" == "jc2" ]; then
fn_info_config_jc2
elif [ "${shortname}" == "jc3" ]; then
fn_info_config_jc3
elif [ "${shortname}" == "jk2" ]; then
fn_info_config_jk2
elif [ "${shortname}" == "kf" ]; then
fn_info_config_kf
elif [ "${shortname}" == "kf2" ]; then
fn_info_config_kf2
elif [ "${shortname}" == "mc" ]||[ "${shortname}" == "pmc" ]; then
fn_info_config_mc
elif [ "${shortname}" == "mcb" ]; then
fn_info_config_mcb
elif [ "${shortname}" == "mohaa" ]; then
fn_info_config_mohaa
elif [ "${shortname}" == "mofm" ]; then
fn_info_config_mofm
elif [ "${shortname}" == "qw" ]; then
fn_info_config_quakeworld
elif [ "${shortname}" == "q2" ]; then
fn_info_config_quake2
elif [ "${shortname}" == "q3" ]; then
fn_info_config_quake3
elif [ "${shortname}" == "ql" ]; then
fn_info_config_quakelive
elif [ "${shortname}" == "jk2" ]; then
fn_info_config_jk2
elif [ "${shortname}" == "mc" ]||[ "${shortname}" == "pmc" ]; then
fn_info_config_minecraft
elif [ "${shortname}" == "mcb" ]; then
fn_info_config_minecraft_bedrock
elif [ "${shortname}" == "mumble" ]; then
fn_info_config_mumble
elif [ "${shortname}" == "onset" ]; then
fn_info_config_onset
elif [ "${shortname}" == "pstbs" ]; then
fn_info_config_pstbs
elif [ "${shortname}" == "pc" ]; then
fn_info_config_projectcars
fn_info_config_pc
elif [ "${shortname}" == "pz" ]; then
fn_info_config_projectzomboid
elif [ "${shortname}" == "arma3" ]; then
fn_info_config_arma3
fn_info_config_pz
elif [ "${shortname}" == "qw" ]; then
fn_info_config_qw
elif [ "${shortname}" == "q2" ]; then
fn_info_config_q2
elif [ "${shortname}" == "q3" ]; then
fn_info_config_q3
elif [ "${shortname}" == "ql" ]; then
fn_info_config_ql
elif [ "${shortname}" == "ro" ]; then
fn_info_config_ro
elif [ "${shortname}" == "rtcw" ]; then
fn_info_config_rtcw
elif [ "${shortname}" == "rw" ]; then
fn_info_config_risingworld
fn_info_config_rw
elif [ "${shortname}" == "sb" ]; then
fn_info_config_sb
elif [ "${shortname}" == "sol" ]; then
fn_info_config_soldat
fn_info_config_sol
elif [ "${shortname}" == "sof2" ]; then
fn_info_config_sof2
elif [ "${engine}" == "source" ]||[ "${engine}" == "goldsrc" ]; then
fn_info_config_source
elif [ "${shortname}" == "sb" ]; then
fn_info_config_starbound
elif [ "${shortname}" == "ts3" ]; then
fn_info_config_teamspeak3
elif [ "${shortname}" == "mumble" ]; then
fn_info_config_mumble
elif [ "${shortname}" == "samp" ]; then
fn_info_config_samp
elif [ "${shortname}" == "pstbs" ]; then
elif [ "${shortname}" == "sbots" ]; then
fn_info_config_sbots
elif [ "${shortname}" == "scpsl" ]||[ "${shortname}" == "scpslsm" ]; then
fn_info_config_scpsl
elif [ "${shortname}" == "sdtd" ]; then
fn_info_config_sdtd
elif [ "${shortname}" == "tw" ]; then
fn_info_config_teeworlds
fn_info_config_tw
elif [ "${shortname}" == "terraria" ]; then
fn_info_config_terraria
elif [ "${shortname}" == "tu" ]; then
fn_info_config_towerunite
fn_info_config_tu
elif [ "${shortname}" == "ut2k4" ]; then
fn_info_config_ut2k4
elif [ "${engine}" == "unreal" ]; then
@ -1866,18 +1869,12 @@ elif [ "${engine}" == "unreal3" ]; then
fn_info_config_unreal3
elif [ "${shortname}" == "ut" ]; then
fn_info_config_ut
elif [ "${shortname}" == "scpsl" ]||[ "${shortname}" == "scpslsm" ]; then
fn_info_config_scpsl
elif [ "${shortname}" == "sdtd" ]; then
fn_info_config_sdtd
elif [ "${shortname}" == "wet" ]; then
fn_info_config_wolfensteinenemyterritory
fn_info_config_wet
elif [ "${shortname}" == "wf" ]; then
fn_info_config_warfork
elif [ "${shortname}" == "etl" ]; then
fn_info_config_etlegacy
fn_info_config_wf
elif [ "${shortname}" == "wurm" ]; then
fn_info_config_wurmunlimited
fn_info_config_wurm
elif [ "${shortname}" == "mta" ]; then
fn_info_config_mta
elif [ "${shortname}" == "squad" ]; then
@ -1885,11 +1882,11 @@ elif [ "${shortname}" == "squad" ]; then
elif [ "${shortname}" == "st" ]; then
fn_info_config_st
elif [ "${shortname}" == "mh" ]; then
fn_info_config_mordhau
fn_info_config_mh
elif [ "${shortname}" == "pvr" ];then
fn_info_config_pavlovvr
fn_info_config_pvr
elif [ "${shortname}" == "vints" ]; then
fn_info_config_vintagestory
fn_info_config_vints
elif [ "${shortname}" == "wmc" ]; then
fn_info_config_waterfall
fn_info_config_wmc
fi

54
lgsm/functions/info_messages.sh

@ -766,23 +766,23 @@ fn_port(){
fi
}
fn_info_message_ark(){
fn_info_message_ac(){
{
fn_port "header"
fn_port "Game" port udp
fn_port "RAW UDP Socket" rawport udp
fn_port "Game" port tcp
fn_port "Query" queryport udp
fn_port "RCON" rconport tcp
fn_port "HTTP" httpport tcp
} | column -s $'\t' -t
}
fn_info_message_ac(){
fn_info_message_ark(){
{
fn_port "header"
fn_port "Game" port udp
fn_port "Game" port tcp
fn_port "RAW UDP Socket" rawport udp
fn_port "Query" queryport udp
fn_port "HTTP" httpport tcp
fn_port "RCON" rconport tcp
} | column -s $'\t' -t
}
@ -923,12 +923,6 @@ fn_info_message_inss(){
} | column -s $'\t' -t
}
fn_info_message_jk2(){
{
fn_port "header"
fn_port "Game" port udp
} | column -s $'\t' -t
}
fn_info_message_jc2(){
{
@ -938,6 +932,7 @@ fn_info_message_jc2(){
} | column -s $'\t' -t
}
fn_info_message_jc3(){
{
fn_port "header"
@ -948,6 +943,13 @@ fn_info_message_jc3(){
} | column -s $'\t' -t
}
fn_info_message_jk2(){
{
fn_port "header"
fn_port "Game" port udp
} | column -s $'\t' -t
}
fn_info_message_mc(){
{
fn_port "header"
@ -1245,13 +1247,13 @@ fn_info_message_st(){
fn_port "header"
fn_port "Game" port udp
fn_port "Query" queryport udp
fn_port "HTTP" httpport tcp
fn_port "Web Admin" webadminport tcp
} | column -s $'\t' -t
echo -e ""
echo -e "${lightgreen}${gamename} Web Admin${default}"
fn_messages_separator
{
echo -e "${lightblue}Web Admin url:\t${default}http://${webadminip}:${httpport}"
echo -e "${lightblue}Web Admin url:\t${default}http://${webadminip}:${webadminport}"
} | column -s $'\t' -t
}
@ -1300,14 +1302,14 @@ fn_info_message_unreal(){
fn_port "Game" port udp
fn_port "Query" queryport udp
fn_port "LAN Beacon" beaconport udp
fn_port "HTTP" httpport tcp
fn_port "Web Admin" webadminport tcp
} | column -s $'\t' -t
echo -e ""
echo -e "${lightgreen}${servername} Web Admin${default}"
fn_messages_separator
{
echo -e "${lightblue}Web Admin enabled:\t${default}${webadminenabled}"
echo -e "${lightblue}Web Admin url:\t${default}http://${webadminip}:${httpport}"
echo -e "${lightblue}Web Admin url:\t${default}http://${webadminip}:${webadminport}"
echo -e "${lightblue}Web Admin username:\t${default}${webadminuser}"
echo -e "${lightblue}Web Admin password:\t${default}${webadminpass}"
} | column -s $'\t' -t
@ -1319,7 +1321,7 @@ fn_info_message_ut2k4(){
fn_port "Game" port udp
fn_port "Query" queryport udp
fn_port "Query (GameSpy)" queryportgs udp
fn_port "HTTP" httpport tcp
fn_port "Web Admin" webadminport tcp
fn_port "LAN" lanport udp
} | column -s $'\t' -t
echo -e ""
@ -1327,7 +1329,7 @@ fn_info_message_ut2k4(){
fn_messages_separator
{
echo -e "${lightblue}Web Admin enabled:\t${default}${webadminenabled}"
echo -e "${lightblue}Web Admin url:\t${default}http://${webadminip}:${httpport}"
echo -e "${lightblue}Web Admin url:\t${default}http://${webadminip}:${webadminport}"
echo -e "${lightblue}Web Admin username:\t${default}${webadminuser}"
echo -e "${lightblue}Web Admin password:\t${default}${webadminpass}"
} | column -s $'\t' -t
@ -1339,7 +1341,7 @@ fn_info_message_kf(){
fn_port "Game" port udp
fn_port "Query" queryport udp
fn_port "Query (GameSpy)" queryportgs udp
fn_port "HTTP" httpport tcp
fn_port "Web Admin" webadminport tcp
fn_port "LAN" lanport udp
fn_port "Steam" steamport udp
fn_port "Steam Master" steammasterport udp
@ -1349,7 +1351,7 @@ fn_info_message_kf(){
fn_messages_separator
{
echo -e "${lightblue}Web Admin enabled:\t${default}${webadminenabled}"
echo -e "${lightblue}Web Admin url:\t${default}http://${webadminip}:${httpport}"
echo -e "${lightblue}Web Admin url:\t${default}http://${webadminip}:${webadminport}"
echo -e "${lightblue}Web Admin username:\t${default}${webadminuser}"
echo -e "${lightblue}Web Admin password:\t${default}${webadminpass}"
} | column -s $'\t' -t
@ -1360,7 +1362,7 @@ fn_info_message_ro(){
fn_port "header"
fn_port "Game" port udp
fn_port "Query" queryport udp
fn_port "HTTP" httpport tcp
fn_port "Web Admin" webadminport tcp
fn_port "LAN" lanport udp
fn_port "Steam" steamport udp
fn_port "Steam Master" steammasterport udp
@ -1370,7 +1372,7 @@ fn_info_message_ro(){
fn_messages_separator
{
echo -e "${lightblue}Web Admin enabled:\t${default}${webadminenabled}"
echo -e "${lightblue}Web Admin url:\t${default}http://${webadminip}:${httpport}"
echo -e "${lightblue}Web Admin url:\t${default}http://${webadminip}:${webadminport}"
echo -e "${lightblue}Web Admin username:\t${default}${webadminuser}"
echo -e "${lightblue}Web Admin password:\t${default}${webadminpass}"
} | column -s $'\t' -t
@ -1383,14 +1385,14 @@ fn_info_message_unreal(){
fn_port "Game" port udp
fn_port "Query" queryport udp
fn_port "LAN Beacon" beaconport udp
fn_port "HTTP" httpport tcp
fn_port "Web Admin" webadminport tcp
} | column -s $'\t' -t
echo -e ""
echo -e "${lightgreen}${servername} Web Admin${default}"
fn_messages_separator
{
echo -e "${lightblue}Web Admin enabled:\t${default}${webadminenabled}"
echo -e "${lightblue}Web Admin url:\t${default}http://${webadminip}:${httpport}"
echo -e "${lightblue}Web Admin url:\t${default}http://${webadminip}:${webadminport}"
echo -e "${lightblue}Web Admin username:\t${default}${webadminuser}"
echo -e "${lightblue}Web Admin password:\t${default}${webadminpass}"
} | column -s $'\t' -t
@ -1426,14 +1428,14 @@ fn_info_message_kf2(){
fn_port "header"
fn_port "Game" port udp
fn_port "Query" queryport udp
fn_port "HTTP" httpport tcp
fn_port "Web Admin" webadminport tcp
} | column -s $'\t' -t
echo -e ""
echo -e "${lightgreen}${servername} Web Admin${default}"
fn_messages_separator
{
echo -e "${lightblue}Web Admin enabled:\t${default}${webadminenabled}"
echo -e "${lightblue}Web Admin url:\t${default}http://${webadminip}:${httpport}"
echo -e "${lightblue}Web Admin url:\t${default}http://${webadminip}:${webadminport}"
echo -e "${lightblue}Web Admin username:\t${default}${webadminuser}"
echo -e "${lightblue}Web Admin password:\t${default}${webadminpass}"
} | column -s $'\t' -t

64
lgsm/functions/info_parms.sh

@ -7,12 +7,6 @@
functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")"
## Examples of filtering to get info from config files
# sed 's/foo//g' - remove foo
# tr -cd '[:digit:]' leave only digits
# tr -d '=\"; ' remove selected charectors =\";
# grep -v "foo" filter out lines that contain foo
unavailable="${red}UNAVAILABLE${default}"
zero="${red}0${default}"
@ -24,7 +18,7 @@ fn_info_parms_ark(){
maxplayers=${maxplayers:-"0"}
}
fn_info_parms_barotrauma(){
fn_info_parms_bt(){
port=${port:-"0"}
queryport=${queryport:-"0"}
}
@ -50,7 +44,7 @@ fn_info_parms_dst(){
cave=${cave:-"NOT SET"}
}
fn_info_parms_factorio(){
fn_info_parms_fctr(){
port=${port:-"0"}
rconport=${rconport:-"0"}
rconpassword=${rconpassword:-"NOT SET"}
@ -76,16 +70,12 @@ fn_info_parms_inss(){
maxplayers=${maxplayers:-"0"}
}
fn_info_parms_jk2(){
queryport=${port}
}
fn_info_parms_kf2(){
queryport=${queryport:-"0"}
defaultmap=${defaultmap:-"NOT SET"}
}
fn_info_parms_mordhau(){
fn_info_parms_mh(){
port=${port:-"0"}
queryport=${queryport:-"0"}
beaconport=${beaconport:-"0"}
@ -106,12 +96,12 @@ fn_info_parms_mta(){
queryport=$((port+123))
}
fn_info_parms_projectzomboid(){
fn_info_parms_pz(){
adminpassword=${adminpassword:-"NOT SET"}
queryport=${port:-"0"}
}
fn_info_parms_quakeworld(){
fn_info_parms_qw(){
port=${port:-"0"}
queryport=${port:-"0"}
}
@ -131,7 +121,7 @@ fn_info_parms_arma3(){
battleeyeport=$((port+4))
}
fn_info_parms_risingworld(){
fn_info_parms_rw(){
servername=${servername:-"NOT SET"}
port=${port:-"0"}
httpqueryport=$((port-1))
@ -203,7 +193,7 @@ fn_info_parms_st(){
}
fn_info_parms_stickybots(){
fn_info_parms_sbots(){
port=${port:-"0"}
queryport=${queryport:-"0"}
servername=${servername:-"NOT SET"}
@ -218,17 +208,13 @@ fn_info_parms_sof2(){
defaultmap=${defaultmap:-"NOT SET"}
}
fn_info_parms_towerunite(){
fn_info_parms_tu(){
port=${port:-"0"}
steamport=$((port+1))
queryport=${queryport:-"0"}
}
fn_info_parms_teeworlds(){
queryport=${port:-"0"}
}
fn_info_parms_pavlovvr(){
fn_info_parms_pvr(){
port=${port:-"0"}
port401=$((port+400))
queryport=${port:-"0"}
@ -250,7 +236,7 @@ fn_info_parms_unreal3(){
defaultmap=${defaultmap:-"NOT SET"}
}
fn_info_parms_unturned(){
fn_info_parms_unt(){
servername=${selfname:-"NOT SET"}
port=${port:-"0"}
queryport=$((port+1))
@ -288,17 +274,15 @@ if [ "${shortname}" == "ark" ]; then
elif [ "${shortname}" == "arma3" ]; then
fn_info_parms_arma3
elif [ "${shortname}" == "bt" ]; then
fn_info_parms_barotrauma
fn_info_parms_bt
elif [ "${shortname}" == "bt1944" ]; then
fn_info_parms_bt1944
elif [ "${shortname}" == "cod" ]||[ "${shortname}" == "coduo" ]||[ "${engine}" == "iw2.0" ]||[ "${engine}" == "iw3.0" ]; then
fn_info_parms_cod
elif [ "${shortname}" == "fctr" ]; then
fn_info_parms_factorio
fn_info_parms_fctr
elif [ "${shortname}" == "inss" ]; then
fn_info_parms_inss
elif [ "${shortname}" == "jk2" ]; then
fn_info_parms_jk2
elif [ "${shortname}" == "kf2" ]; then
fn_info_parms_kf2
elif [ "${shortname}" == "mohaa" ]; then
@ -306,39 +290,35 @@ elif [ "${shortname}" == "mohaa" ]; then
elif [ "${shortname}" == "mom" ]; then
fn_info_parms_mom
elif [ "${shortname}" == "pz" ]; then
fn_info_parms_projectzomboid
fn_info_parms_pz
elif [ "${shortname}" == "pvr" ]; then
fn_info_parms_pavlovvr
fn_info_parms_pvr
elif [ "${shortname}" == "qw" ]; then
fn_info_parms_quakeworld
fn_info_parms_qw
elif [ "${shortname}" == "q2" ]||[ "${shortname}" == "q3" ]; then
fn_info_parms_quake2
elif [ "${shortname}" == "rtcw" ]; then
fn_info_parms_rtcw
elif [ "${shortname}" == "rust" ]; then
fn_info_parms_rust
elif [ "${shortname}" == "samp" ]; then
fn_info_parms_samp
elif [ "${shortname}" == "st" ]; then
fn_info_parms_st
elif [ "${shortname}" == "rw" ]; then
fn_info_parms_risingworld
fn_info_parms_rw
elif [ "${shortname}" == "sof2" ]; then
fn_info_parms_sof2
elif [ "${shortname}" == "sbots" ]; then
fn_info_parms_stickybots
fn_info_parms_sbots
elif [ "${engine}" == "source" ]||[ "${engine}" == "goldsrc" ]; then
fn_info_parms_source
elif [ "${engine}" == "spark" ]; then
fn_info_parms_spark
elif [ "${shortname}" == "tu" ]; then
fn_info_parms_towerunite
elif [ "${shortname}" == "tw" ]; then
fn_info_parms_teeworlds
fn_info_parms_tu
elif [ "${shortname}" == "vh" ]; then
fn_info_parms_vh
elif [ "${shortname}" == "mh" ]; then
fn_info_parms_mordhau
fn_info_parms_mh
elif [ "${shortname}" == "mta" ]; then
fn_info_parms_mta
elif [ "${engine}" == "unreal" ]||[ "${engine}" == "unreal2" ]; then
@ -346,12 +326,12 @@ elif [ "${engine}" == "unreal" ]||[ "${engine}" == "unreal2" ]; then
elif [ "${engine}" == "unreal3" ]; then
fn_info_parms_unreal3
elif [ "${shortname}" == "unt" ]; then
fn_info_parms_unturned
fn_info_parms_unt
elif [ "${shortname}" == "ut" ]; then
fn_info_parms_ut
elif [ "${shortname}" == "wf" ]; then
fn_info_parms_wf
# for servers that have a missing queryport from the config
elif [ "${shortname}" == "scpsl" ]||[ "${shortname}" == "scpslsm" ]; then
# for servers that have a missing queryport from the game config.
elif [ "${shortname}" == "samp" ]||[ "${shortname}" == "scpsl" ]||[ "${shortname}" == "scpslsm" ]||[ "${shortname}" == "jk2" ]||[ "${shortname}" == "tw" ]; then
fn_info_parms_queryport
fi

Loading…
Cancel
Save