|
|
@ -320,6 +320,7 @@ fn_info_config_inss(){ |
|
|
|
rconport=${rconport:-"0"} |
|
|
|
fi |
|
|
|
} |
|
|
|
|
|
|
|
fn_info_config_minecraft(){ |
|
|
|
if [ ! -f "${servercfgfullpath}" ]; then |
|
|
|
servername="${unavailable}" |
|
|
@ -329,7 +330,6 @@ fn_info_config_minecraft(){ |
|
|
|
port="${zero}" |
|
|
|
queryport="${zero}" |
|
|
|
queryenabled="${unavailable}" |
|
|
|
rconport="${zero}" |
|
|
|
gamemode="${unavailable}" |
|
|
|
gameworld="${unavailable}" |
|
|
|
else |
|
|
@ -338,9 +338,8 @@ fn_info_config_minecraft(){ |
|
|
|
rconport=$(grep "rcon.port" "${servercfgfullpath}" | grep -v "#" | tr -cd '[:digit:]') |
|
|
|
maxplayers=$(grep "max-players" "${servercfgfullpath}" | grep -v "#" | tr -cd '[:digit:]') |
|
|
|
port=$(grep "server-port" "${servercfgfullpath}" | grep -v "#" | tr -cd '[:digit:]') |
|
|
|
queryport=$(grep "query.port" "${servercfgfullpath}" | grep -v "#" | tr -cd '[:digit:]') |
|
|
|
queryport="${port}" |
|
|
|
queryenabled=$(grep "enable-query" "${servercfgfullpath}" | sed -e 's/^[ \t]*//g' -e '/^#/d' -e 's/enable-query//g' | tr -d '=\";,:' | sed -e 's/^[ \t]*//' -e 's/[ \t]*$//') |
|
|
|
rconport=$(grep "rcon.port" "${servercfgfullpath}" | grep -v "#" | tr -cd '[:digit:]') |
|
|
|
gamemode=$(grep "gamemode" "${servercfgfullpath}" | grep -v "#" | tr -cd '[:digit:]') |
|
|
|
gameworld=$(grep "level-name" "${servercfgfullpath}" | sed -e 's/^[ \t]*//g' -e '/^#/d' -e 's/level-name//g' | tr -d '=\";,:' | sed -e 's/^[ \t]*//' -e 's/[ \t]*$//') |
|
|
|
|
|
|
@ -354,9 +353,10 @@ fn_info_config_minecraft(){ |
|
|
|
rconport=${rconport:-"NOT SET"} |
|
|
|
maxplayers=${maxplayers:-"NOT SET"} |
|
|
|
port=${port:-"NOT SET"} |
|
|
|
queryport="${queryport:-"NOT SET"}" |
|
|
|
queryenabled="${queryenabled:-"NOT SET"}" |
|
|
|
gamemode=${gamemode:-"NOT SET"} |
|
|
|
gameworld=${gameworld:-"NOT SET"} |
|
|
|
|
|
|
|
fi |
|
|
|
} |
|
|
|
|
|
|
|