|
@@ -589,6 +589,36 @@ fn_info_config_seriousengine35(){
|
|
|
fi
|
|
fi
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
+#StickyBots
|
|
|
|
|
+fn_info_config_sbots(){
|
|
|
|
|
+ if [ ! -f "${servercfgfullpath}" ]; then
|
|
|
|
|
+ servername="${unavailable}"
|
|
|
|
|
+ maxplayers="${unavailable}"
|
|
|
|
|
+ numreservedslots="${unavailable}"
|
|
|
|
|
+ else
|
|
|
|
|
+ servername="$(grep "ServerName=" "${servercfgfullpath}" | sed -e 's/^[ \t]//g' -e '/^#/d' -e 's/ServerName//g' | tr -d '=";,:' | sed -e 's/^[ \t]//' -e 's/[ \t]*$//')"
|
|
|
|
|
+ maxplayers="$(grep "MaxPlayers=" "${servercfgfullpath}" | tr -cd '[:digit:]')"
|
|
|
|
|
+ numreservedslots="$(grep "NumReservedSlots=" "${servercfgfullpath}" | tr -cd '[:digit:]')"
|
|
|
|
|
+ fi
|
|
|
|
|
+
|
|
|
|
|
+ if [ ! -f "${servercfgdir}/Rcon.cfg" ]; then
|
|
|
|
|
+ rconport=${unavailable}
|
|
|
|
|
+ rconpassword=${unavailable}
|
|
|
|
|
+ else
|
|
|
|
|
+ rconport=$(grep "Port=" "${servercfgdir}/Rcon.cfg" | tr -cd '[:digit:]')
|
|
|
|
|
+ rconpassword=$(grep "Password=" "${servercfgdir}/Rcon.cfg" | sed -e 's/^[ \t]*//g' -e '/^\//d' -e 's/Password//g' | tr -d '=\";,:' | sed -e 's/^[ \t]*//' -e 's/[ \t]*$//')
|
|
|
|
|
+ fi
|
|
|
|
|
+
|
|
|
|
|
+ rconport=${rconport:-"0"}
|
|
|
|
|
+ if [ -z "${rconpassword}" ]||[ ${#rconpassword} == 1 ]; then
|
|
|
|
|
+ rconpassword="NOT SET"
|
|
|
|
|
+ fi
|
|
|
|
|
+ servername=${servername:-"NOT SET"}
|
|
|
|
|
+ serverpassword=${serverpassword:-"NOT SET"}
|
|
|
|
|
+ maxplayers=${maxplayers:-"0"}
|
|
|
|
|
+ numreservedslots=${maxplayers:-"0"}
|
|
|
|
|
+}
|
|
|
|
|
+
|
|
|
fn_info_config_source(){
|
|
fn_info_config_source(){
|
|
|
if [ ! -f "${servercfgfullpath}" ]; then
|
|
if [ ! -f "${servercfgfullpath}" ]; then
|
|
|
servername="${unavailable}"
|
|
servername="${unavailable}"
|
|
@@ -1178,6 +1208,9 @@ elif [ "${gamename}" == "Mumble" ]; then
|
|
|
# San Andreas Multiplayer
|
|
# San Andreas Multiplayer
|
|
|
elif [ "${gamename}" == "San Andreas Multiplayer" ]; then
|
|
elif [ "${gamename}" == "San Andreas Multiplayer" ]; then
|
|
|
fn_info_config_samp
|
|
fn_info_config_samp
|
|
|
|
|
+# StickyBots
|
|
|
|
|
+elif [ "${shortname}" == "pstbs" ]; then
|
|
|
|
|
+ fn_info_config_sbots
|
|
|
# Teeworlds
|
|
# Teeworlds
|
|
|
elif [ "${engine}" == "teeworlds" ]; then
|
|
elif [ "${engine}" == "teeworlds" ]; then
|
|
|
fn_info_config_teeworlds
|
|
fn_info_config_teeworlds
|