Browse Source

Details

pull/1133/head
Kristian Polso 9 years ago
parent
commit
f7e99e6428
  1. 16
      lgsm/functions/command_details.sh

16
lgsm/functions/command_details.sh

@ -290,7 +290,7 @@ fn_details_ports(){
parmslocation="${red}UNKNOWN${default}" parmslocation="${red}UNKNOWN${default}"
# engines that require editing in the config file # 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[@]}" 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
@ -298,7 +298,7 @@ fn_details_ports(){
fi fi
done done
# engines that require editing in the script file # 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[@]}" 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
@ -340,6 +340,15 @@ fn_details_dontstarve(){
} | column -s $'\t' -t } | 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(){ fn_details_minecraft(){
echo -e "netstat -atunp | grep java" echo -e "netstat -atunp | grep java"
echo -e "" echo -e ""
@ -673,6 +682,8 @@ fn_display_details() {
fn_details_rust fn_details_rust
elif [ "${gamename}" == "Wolfenstein: Enemy Territory" ]; then elif [ "${gamename}" == "Wolfenstein: Enemy Territory" ]; then
fn_details_wolfensteinenemyterritory fn_details_wolfensteinenemyterritory
elif [ "${gamename}" == "Factorio" ]; then
fn_details_factorio
else else
fn_print_error_nl "Unable to detect server engine." fn_print_error_nl "Unable to detect server engine."
fi fi
@ -685,3 +696,4 @@ then
fn_display_details fn_display_details
core_exit.sh core_exit.sh
fi fi

Loading…
Cancel
Save