diff --git a/lgsm/data/serverlist.csv b/lgsm/data/serverlist.csv index f5463cd84..e351f9a5d 100644 --- a/lgsm/data/serverlist.csv +++ b/lgsm/data/serverlist.csv @@ -53,6 +53,7 @@ ios,iosserver,IOSoccer jc2,jc2server,Just Cause 2 jc3,jc3server,Just Cause 3 jk2,jk2server,Jedi Knight II: Jedi Outcast +jk3,jk3server,Jedi Knight: Jedi Academy kf,kfserver,Killing Floor kf2,kf2server,Killing Floor 2 lo,loserver,Last Oasis diff --git a/lgsm/functions/info_game.sh b/lgsm/functions/info_game.sh index 88c27b4c9..c6aa4b064 100644 --- a/lgsm/functions/info_game.sh +++ b/lgsm/functions/info_game.sh @@ -776,6 +776,35 @@ fn_info_game_jk2(){ defaultmap=${defaultmap:-"NOT SET"} } +fn_info_game_jk2(){ + # Config + if [ ! -f "${servercfgfullpath}" ]; then + rconpassword="${unavailable}" + servername="${unavailable}" + serverpassword="${unavailable}" + maxplayers="${zero}" + serverversion="${unavailable}" + else + rconpassword=$(grep "seta rconpassword" "${servercfgfullpath}" | sed -e 's/^[ \t]*//g' -e '/^\//d' -e 's/seta rconpassword//g' | tr -d '=\";,:' | sed -e 's/^[ \t]*//' -e 's/[ \t]*$//') + servername=$(grep "seta sv_hostname" "${servercfgfullpath}" | sed -e 's/^[ \t]*//g' -e '/^\//d' -e 's/seta sv_hostname//g' | tr -d '=\";,:' | sed -e 's/^[ \t]*//' -e 's/[ \t]*$//') + serverpassword=$(grep "seta g_password" "${servercfgfullpath}" | sed -e 's/^[ \t]*//g' -e '/^\//d' -e 's/seta g_password//g' | tr -d '=\";,:' | sed -e 's/^[ \t]*//' -e 's/[ \t]*$//') + maxplayers=$(grep "seta sv_maxclients" "${servercfgfullpath}" | grep -v "#" | tr -cd '[:digit:]') + serverversion=$(grep "seta mv_serverversion" "${servercfgfullpath}" | sed -e 's/^[ \t]*//g' -e '/^\//d' -e 's/seta mv_serverversion//g' | tr -d '=\";,:' | sed -e 's/^[ \t]*//' -e 's/[ \t]*$//') + + # Not set + rconpassword=${rconpassword:-"NOT SET"} + servername=${servername:-"NOT SET"} + serverpassword=${serverpassword:-"NOT SET"} + maxplayers=${maxplayers:-"0"} + serverversion=${serverversion:-"NOT SET"} + fi + + # Parameters + port=${port:-"0"} + queryport=${port} + defaultmap=${defaultmap:-"NOT SET"} +} + fn_info_game_kf(){ # Config if [ ! -f "${servercfgfullpath}" ]; then @@ -2361,6 +2390,8 @@ elif [ "${shortname}" == "jc3" ]; then fn_info_game_jc3 elif [ "${shortname}" == "jk2" ]; then fn_info_game_jk2 +elif [ "${shortname}" == "jk3" ]; then + fn_info_game_jk3 elif [ "${shortname}" == "kf" ]; then fn_info_game_kf elif [ "${shortname}" == "kf2" ]; then diff --git a/lgsm/functions/info_messages.sh b/lgsm/functions/info_messages.sh index f0def5b0e..deda5eece 100755 --- a/lgsm/functions/info_messages.sh +++ b/lgsm/functions/info_messages.sh @@ -1062,6 +1062,13 @@ fn_info_message_jk2(){ } | column -s $'\t' -t } +fn_info_message_jk3(){ + { + fn_port "header" + fn_port "Game" port udp + } | column -s $'\t' -t +} + fn_info_message_kf(){ { fn_port "header" @@ -1706,6 +1713,8 @@ fn_info_message_select_engine(){ fn_info_message_jc3 elif [ "${shortname}" == "jk2" ]; then fn_info_message_jk2 + elif [ "${shortname}" == "jk3" ]; then + fn_info_message_jk3 elif [ "${shortname}" == "kf" ]; then fn_info_message_kf elif [ "${shortname}" == "kf2" ]; then diff --git a/lgsm/functions/install_config.sh b/lgsm/functions/install_config.sh index a7c18b65d..77d4bcf21 100755 --- a/lgsm/functions/install_config.sh +++ b/lgsm/functions/install_config.sh @@ -672,6 +672,12 @@ elif [ "${shortname}" == "jk2" ]; then fn_fetch_default_config fn_default_config_remote fn_set_config_vars +elif [ "${shortname}" == "jk3" ]; then + gamedirname="JediKnightJediAcademy" + array_configs+=( server.cfg ) + fn_fetch_default_config + fn_default_config_remote + fn_set_config_vars elif [ "${shortname}" == "qw" ]; then gamedirname="QuakeWorld" array_configs+=( server.cfg )