Browse Source

cmw

cmw
pull/3428/head
Daniel Gibbs 4 years ago
parent
commit
9641d3d708
  1. 14
      lgsm/functions/info_config.sh
  2. 9
      lgsm/functions/info_messages.sh

14
lgsm/functions/info_config.sh

@ -235,20 +235,18 @@ fn_info_config_bfv(){
fi
}
fn_info_config_chivalry(){
fn_info_config_cmw(){
if [ ! -f "${servercfgfullpath}" ]; then
servername="${unavailable}"
serverpassword="${unavailable}"
adminpassword="${unavailable}"
else
rconport="${unavailable}"
else
servername=$(grep -E "^ServerName" "${servercfgfullpath}" | sed 's/^ServerName=//')
adminpassword=$(grep -E "^AdminPassword" "${servercfgfullpath}" | sed 's/^AdminPassword=//')
rconport=$(grep -E "^RConPort=" "${servercfgdir}/DefaultGame.ini" | tr -cd '[:digit:]')
# Not Set
servername=${servername:-"NOT SET"}
serverpassword=${serverpassword:-"NOT SET"}
adminpassword=${adminpassword:-"NOT SET"}
port=${port:-"0"}
rconport=${port:-"0"}
fi
}
@ -1613,7 +1611,7 @@ elif [ "${shortname}" == "bf1942" ]; then
elif [ "${shortname}" == "bfv" ]; then
fn_info_config_bfv
elif [ "${shortname}" == "cmw" ]; then
fn_info_config_chivalry
fn_info_config_cmw
elif [ "${shortname}" == "cod" ]||[ "${shortname}" == "coduo" ]; then
fn_info_config_cod
elif [ "${shortname}" == "cod2" ]; then

9
lgsm/functions/info_messages.sh

@ -790,7 +790,8 @@ fn_info_message_cod(){
fn_info_message_coduo(){
{
echo -e "${lightblue}DESCRIPTION\tPORT\tPROTOCOL\tLISTEN${default}"
echo -e "> Game\t${port}\tudp"
echo -e "Game\t${port}\tudp\t$(echo "${ssinfo}" | grep ${port} | wc -l)"
echo -e "Query\t${queryport}\tudp\t$(echo "${ssinfo}" | grep ${queryport} | wc -l)"
} | column -s $'\t' -t
}
@ -798,9 +799,9 @@ fn_info_message_chivalry(){
fn_info_message_password_strip
{
echo -e "${lightblue}DESCRIPTION\tPORT\tPROTOCOL\tLISTEN${default}"
echo -e "> Game\t${port}\tudp"
echo -e "> Query\t${queryport}\tudp"
echo -e "> RCON\t27960\ttcp"
echo -e "Game\t${port}\tudp"
echo -e "Query\t${queryport}\tudp"
echo -e "RCON\t${rconport}\ttcp\t$(echo "${ssinfo}" | grep ${rconport} | wc -l)"
} | column -s $'\t' -t
}

Loading…
Cancel
Save