|
|
@@ -154,6 +154,24 @@ fn_info_config_projectzomboid(){
|
|
|
fi
|
|
|
}
|
|
|
|
|
|
+fn_info_config_quake2(){
|
|
|
+ if [ ! -f "${servercfgfullpath}" ]; then
|
|
|
+ rconpassword="${unavailable}"
|
|
|
+ servername="${unavailable}"
|
|
|
+ serverpassword="${unavailable}"
|
|
|
+ slots="${zero}"
|
|
|
+ else
|
|
|
+ rconpassword=$(grep "rcon_password" "${servercfgfullpath}" | sed -e 's/^[ \t]*//g' -e '/^\//d' -e 's/set rcon_password//g' | tr -d '=\";,:' | sed -e 's/^[ \t]*//' -e 's/[ \t]*$//')
|
|
|
+ servername=$(grep "hostname" "${servercfgfullpath}" | sed -e 's/^[ \t]*//g' -e '/^\//d' -e 's/set hostname//g' | tr -d '=\";,:' | sed -e 's/^[ \t]*//' -e 's/[ \t]*$//')
|
|
|
+ slots=$(grep "maxclients" "${servercfgfullpath}" | grep -v "#" | tr -cd '[:digit:]')
|
|
|
+
|
|
|
+ # Not Set
|
|
|
+ rconpassword=${rconpassword:-"NOT SET"}
|
|
|
+ servername=${servername:-"NOT SET"}
|
|
|
+ slots=${slots:-"0"}
|
|
|
+ fi
|
|
|
+}
|
|
|
+
|
|
|
fn_info_config_quake3(){
|
|
|
if [ ! -f "${servercfgfullpath}" ]; then
|
|
|
rconpassword="${unavailable}"
|