Browse Source

ARMA 3 port-details

Shows the right ports when passing port as parameter
pull/569/head
Phil 9 years ago
parent
commit
c6e6d9705f
  1. 46
      functions/fn_details_config

46
functions/fn_details_config

@ -209,29 +209,29 @@ elif [ "${engine}" == "realvirtuality" ]; then
slots="\e[0;31mUNAVAILABLE\e[0m" slots="\e[0;31mUNAVAILABLE\e[0m"
fi fi
# port # port
if [ -f "${servercfgfullpath}" ]; then if [ "${srvport}" != "" ]; then
port=$(grep "serverport=" "${servercfgfullpath}" | grep -v // | tr -d '\r' | tr -cd '[:digit:]') port=${srvport}
fi fi
if [ ! -n "${port}" ]; then if [ ! -n "${port}" ]; then
port="0" port="0"
fi fi
# query port # query port
if [ -f "${servercfgfullpath}" ]; then if [ "${srvport}" != "" ]; then
queryport=$(grep "steamqueryport=" "${servercfgfullpath}" | grep -v // | tr -d '\r' | tr -cd '[:digit:]') queryport=$((srvport+1))
fi fi
if [ ! -n "${queryport}" ]; then if [ ! -n "${queryport}" ]; then
queryport="0" queryport="0"
fi fi
# master port # master port
if [ -f "${servercfgfullpath}" ]; then if [ "${srvport}" != "" ]; then
masterport=$(grep "steamport=" "${servercfgfullpath}" | grep -v // | tr -d '\r' | tr -cd '[:digit:]') masterport=$((srvport+2))
fi fi
if [ ! -n "${masterport}" ]; then if [ ! -n "${masterport}" ]; then
masterport="0" masterport="0"
fi fi
fn_servercfgfullpath fn_servercfgfullpath

Loading…
Cancel
Save