Skip to content

Commit

Permalink
Merged hotfix/ultimatebyte-142 into master
Browse files Browse the repository at this point in the history
  • Loading branch information
dgibbs64 committed Jan 15, 2017
2 parents 3ec3659 + c553554 commit aac9bde
Showing 1 changed file with 18 additions and 10 deletions.
28 changes: 18 additions & 10 deletions lgsm/functions/command_details.sh
Original file line number Diff line number Diff line change
Expand Up @@ -310,15 +310,15 @@ fn_details_ports(){

parmslocation="${red}UNKNOWN${default}"
# engines/games that require editing in the config file
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" )
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" )
for port_edit in "${ports_edit_array[@]}"
do
if [ "${engine}" == "${port_edit}" ]||[ "${gamename}" == "${port_edit}" ]; then
parmslocation="${servercfgfullpath}"
fi
done
# engines/games that require editing in the script file
local ports_edit_array=( "goldsource" "Factorio" "Hurtworld" "iw3.0" "Rust" "spark" "source" "starbound" "unreal4" )
local ports_edit_array=( "goldsource" "Factorio" "Hurtworld" "iw3.0" "Rust" "spark" "source" "starbound" "unreal4" "realvirtuality")
for port_edit in "${ports_edit_array[@]}"
do
if [ "${engine}" == "${port_edit}" ]||[ "${gamename}" == "${port_edit}" ]; then
Expand Down Expand Up @@ -347,9 +347,14 @@ fn_details_ark(){
echo -e "netstat -atunp | grep ShooterGame"
echo -e ""
{
echo -e "DESCRIPTION\tDIRECTION\tPORT\tPROTOCOL\tINI VARIABLE"
echo -e "> Game\tINBOUND\t${port}\tudp\tPort=${port}"
echo -e "DESCRIPTION\tDIRECTION\tPORT\tPROTOCOL"
echo -e "> Game\tINBOUND\t${port}\tudp"
# Don't do arithmetics if ever the port wasn't a numeric value
if [ "${port}" -eq "${port}" ]; then
echo -e "> RAW\tINBOUND\t$((port+1))\tudp"
fi
echo -e "> Query\tINBOUND\t${queryport}\tudp"
echo -e "> RCON\tINBOUND\t${rconport}\ttcp"
} | column -s $'\t' -t
}

Expand Down Expand Up @@ -521,15 +526,19 @@ fn_details_quakelive(){
fn_details_realvirtuality(){
echo -e "netstat -atunp | grep arma3server"
echo -e ""
if [ -z "${port}" ]||[ -z "${queryport}" ]||[ -z "${masterport}" ]; then
echo -e "${red}ERROR!${default} Missing/commented ports in ${servercfg}."
echo -e ""
# Default port
if [ -z "${port}" ]; then
port="2302"
fi
{
echo -e "DESCRIPTION\tDIRECTION\tPORT\tPROTOCOL"
echo -e "> Game\tINBOUND\t${port}\tudp"
echo -e "> Steam: Query\tINBOUND\t${queryport}\tudp"
echo -e "> Steam: Master traffic\tINBOUND\t${masterport}\tudp"
# Don't do arithmetics if ever the port wasn't a numeric value
if [ "${port}" -eq "${port}" ]; then
echo -e "> Steam: Query\tINBOUND\t$((port+1))\tudp"
echo -e "> Steam: Master traffic\tINBOUND\t$((port+2))\tudp"
echo -e "> Undocumented Port\tINBOUND\t$((port+3))\tudp"
fi
} | column -s $'\t' -t
}

Expand Down Expand Up @@ -816,4 +825,3 @@ then
fn_display_details
core_exit.sh
fi

0 comments on commit aac9bde

Please sign in to comment.