|
|
@ -199,6 +199,33 @@ fn_info_config_bf1942(){ |
|
|
|
fi |
|
|
|
} |
|
|
|
|
|
|
|
fn_info_config_bfv(){ |
|
|
|
if [ ! -f "${servercfgfullpath}" ]; then |
|
|
|
servername="${unavailable}" |
|
|
|
serverpassword="${unavailable}" |
|
|
|
maxplayers="${zero}" |
|
|
|
port="${zero}" |
|
|
|
queryport="${zero}" |
|
|
|
else |
|
|
|
|
|
|
|
servername=$(grep "game.serverName " "${servercfgfullpath}" | sed -e 's/^[ \t]*//g' -e '/^--/d' -e 's/game.serverName //g' | tr -d '=\";,:' | xargs) |
|
|
|
serverpassword=$(grep "game.serverPassword" "${servercfgfullpath}" | sed -e 's/^ *//g' -e '/^--/d' -e 's/game.serverPassword//g' | tr -d '=\";,:' | xargs) |
|
|
|
maxplayers=$(grep "game.serverMaxPlayers" "${servercfgfullpath}" | grep -v "\--" | tr -cd '[:digit:]') |
|
|
|
port=$(grep "game.serverPort" "${servercfgfullpath}" | grep -v "\--" | tr -cd '[:digit:]') |
|
|
|
queryport="22000" |
|
|
|
|
|
|
|
ip=$(grep "game.serverIP" "${servercfgfullpath}" | sed -e 's/^[ \t]*//g' -e '/^--/d' -e 's/game.serverIP//g' | tr -d '=\";,:' | xargs) |
|
|
|
ipsetinconfig=1 |
|
|
|
ipinconfigvar="game.serverIP" |
|
|
|
|
|
|
|
# Not Set |
|
|
|
servername=${servername:-"NOT SET"} |
|
|
|
serverpassword=${serverpassword:-"NOT SET"} |
|
|
|
maxplayers=${maxplayers:-"0"} |
|
|
|
port=${port:-"0"} |
|
|
|
fi |
|
|
|
} |
|
|
|
|
|
|
|
fn_info_config_chivalry(){ |
|
|
|
if [ ! -f "${servercfgfullpath}" ]; then |
|
|
|
servername="${unavailable}" |
|
|
@ -1472,6 +1499,9 @@ elif [ "${shortname}" == "bt1944" ]; then |
|
|
|
# Battlefield: 1942 |
|
|
|
elif [ "${shortname}" == "bf1942" ]; then |
|
|
|
fn_info_config_bf1942 |
|
|
|
# Battlefield: Vietnam |
|
|
|
elif [ "${shortname}" == "bfv" ]; then |
|
|
|
fn_info_config_bfv |
|
|
|
# Chivalry: Medieval Warfare |
|
|
|
elif [ "${shortname}" == "cmw" ]; then |
|
|
|
fn_info_config_chivalry |
|
|
|