From f7e99e6428b07e3edd27911c9fdd21888a81bcdd Mon Sep 17 00:00:00 2001 From: Kristian Polso Date: Wed, 19 Oct 2016 13:43:51 +0300 Subject: [PATCH] Details --- lgsm/functions/command_details.sh | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) diff --git a/lgsm/functions/command_details.sh b/lgsm/functions/command_details.sh index 7dbbd5e52..e9f8f6b4c 100644 --- a/lgsm/functions/command_details.sh +++ b/lgsm/functions/command_details.sh @@ -290,7 +290,7 @@ fn_details_ports(){ parmslocation="${red}UNKNOWN${default}" # engines that require editing in the config file - local ports_edit_array=( "avalanche" "dontstarve" "idtech3" "lwjgl2" "projectzomboid" "idtech3_ql" "refractor" "realvirtuality" "seriousengine35" "teeworlds" "terraria" "unreal" "unreal2" "unreal3" "TeamSpeak 3" "Mumble" "7 Days To Die" "Factorio" ) + local ports_edit_array=( "avalanche" "dontstarve" "idtech3" "lwjgl2" "projectzomboid" "idtech3_ql" "refractor" "realvirtuality" "seriousengine35" "teeworlds" "terraria" "unreal" "unreal2" "unreal3" "TeamSpeak 3" "Mumble" "7 Days To Die" ) for port_edit in "${ports_edit_array[@]}" do if [ "${engine}" == "${port_edit}" ]||[ "${gamename}" == "${port_edit}" ]; then @@ -298,7 +298,7 @@ fn_details_ports(){ fi done # engines that require editing in the script file - local ports_edit_array=( "starbound" "spark" "source" "goldsource" "Rust" "Hurtworld" "unreal4") + local ports_edit_array=( "starbound" "spark" "source" "goldsource" "Rust" "Hurtworld" "unreal4" "Factorio" ) for port_edit in "${ports_edit_array[@]}" do if [ "${engine}" == "${port_edit}" ]||[ "${gamename}" == "${port_edit}" ]; then @@ -340,6 +340,15 @@ fn_details_dontstarve(){ } | column -s $'\t' -t } +fn_details_factorio(){ + echo -e "netstat -atunp | grep factorio" + echo -e "" + { + echo -e "DESCRIPTION\tDIRECTION\tPORT\tPROTOCOL" + echo -e "> Game\tINBOUND\t${port}\ttcp" + } | column -s $'\t' -t +} + fn_details_minecraft(){ echo -e "netstat -atunp | grep java" echo -e "" @@ -673,6 +682,8 @@ fn_display_details() { fn_details_rust elif [ "${gamename}" == "Wolfenstein: Enemy Territory" ]; then fn_details_wolfensteinenemyterritory + elif [ "${gamename}" == "Factorio" ]; then + fn_details_factorio else fn_print_error_nl "Unable to detect server engine." fi @@ -685,3 +696,4 @@ then fn_display_details core_exit.sh fi +