Kristian Polso 9 лет назад
Родитель
Сommit
f7e99e6428
1 измененных файлов с 14 добавлено и 2 удалено
  1. 14 2
      lgsm/functions/command_details.sh

+ 14 - 2
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
+