Skip to content

Commit aac9bde

Browse files
committed
Merged hotfix/ultimatebyte-142 into master
2 parents 3ec3659 + c553554 commit aac9bde

File tree

1 file changed

+18
-10
lines changed

1 file changed

+18
-10
lines changed

lgsm/functions/command_details.sh

Lines changed: 18 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -310,15 +310,15 @@ fn_details_ports(){
310310

311311
parmslocation="${red}UNKNOWN${default}"
312312
# engines/games that require editing in the config file
313-
local ports_edit_array=( "avalanche" "dontstarve" "idtech2" "idtech3" "idtech3_ql" "lwjgl2" "projectzomboid" "quake" "refractor" "realvirtuality" "seriousengine35" "teeworlds" "terraria" "unreal" "unreal2" "unreal3" "TeamSpeak 3" "Mumble" "7 Days To Die" )
313+
local ports_edit_array=( "avalanche" "dontstarve" "idtech2" "idtech3" "idtech3_ql" "lwjgl2" "projectzomboid" "quake" "refractor" "seriousengine35" "teeworlds" "terraria" "unreal" "unreal2" "unreal3" "TeamSpeak 3" "Mumble" "7 Days To Die" )
314314
for port_edit in "${ports_edit_array[@]}"
315315
do
316316
if [ "${engine}" == "${port_edit}" ]||[ "${gamename}" == "${port_edit}" ]; then
317317
parmslocation="${servercfgfullpath}"
318318
fi
319319
done
320320
# engines/games that require editing in the script file
321-
local ports_edit_array=( "goldsource" "Factorio" "Hurtworld" "iw3.0" "Rust" "spark" "source" "starbound" "unreal4" )
321+
local ports_edit_array=( "goldsource" "Factorio" "Hurtworld" "iw3.0" "Rust" "spark" "source" "starbound" "unreal4" "realvirtuality")
322322
for port_edit in "${ports_edit_array[@]}"
323323
do
324324
if [ "${engine}" == "${port_edit}" ]||[ "${gamename}" == "${port_edit}" ]; then
@@ -347,9 +347,14 @@ fn_details_ark(){
347347
echo -e "netstat -atunp | grep ShooterGame"
348348
echo -e ""
349349
{
350-
echo -e "DESCRIPTION\tDIRECTION\tPORT\tPROTOCOL\tINI VARIABLE"
351-
echo -e "> Game\tINBOUND\t${port}\tudp\tPort=${port}"
350+
echo -e "DESCRIPTION\tDIRECTION\tPORT\tPROTOCOL"
351+
echo -e "> Game\tINBOUND\t${port}\tudp"
352+
# Don't do arithmetics if ever the port wasn't a numeric value
353+
if [ "${port}" -eq "${port}" ]; then
354+
echo -e "> RAW\tINBOUND\t$((port+1))\tudp"
355+
fi
352356
echo -e "> Query\tINBOUND\t${queryport}\tudp"
357+
echo -e "> RCON\tINBOUND\t${rconport}\ttcp"
353358
} | column -s $'\t' -t
354359
}
355360

@@ -521,15 +526,19 @@ fn_details_quakelive(){
521526
fn_details_realvirtuality(){
522527
echo -e "netstat -atunp | grep arma3server"
523528
echo -e ""
524-
if [ -z "${port}" ]||[ -z "${queryport}" ]||[ -z "${masterport}" ]; then
525-
echo -e "${red}ERROR!${default} Missing/commented ports in ${servercfg}."
526-
echo -e ""
529+
# Default port
530+
if [ -z "${port}" ]; then
531+
port="2302"
527532
fi
528533
{
529534
echo -e "DESCRIPTION\tDIRECTION\tPORT\tPROTOCOL"
530535
echo -e "> Game\tINBOUND\t${port}\tudp"
531-
echo -e "> Steam: Query\tINBOUND\t${queryport}\tudp"
532-
echo -e "> Steam: Master traffic\tINBOUND\t${masterport}\tudp"
536+
# Don't do arithmetics if ever the port wasn't a numeric value
537+
if [ "${port}" -eq "${port}" ]; then
538+
echo -e "> Steam: Query\tINBOUND\t$((port+1))\tudp"
539+
echo -e "> Steam: Master traffic\tINBOUND\t$((port+2))\tudp"
540+
echo -e "> Undocumented Port\tINBOUND\t$((port+3))\tudp"
541+
fi
533542
} | column -s $'\t' -t
534543
}
535544

@@ -816,4 +825,3 @@ then
816825
fn_display_details
817826
core_exit.sh
818827
fi
819-

0 commit comments

Comments
 (0)