Browse Source

Merge branch 'develop' into feature/bfv

pull/2909/head
Daniel Gibbs 5 years ago
parent
commit
be2eea0c0b
  1. 2
      lgsm/functions/fix_av.sh
  2. 2
      lgsm/functions/info_messages.sh
  3. 11
      lgsm/functions/query_gamedig.sh

2
lgsm/functions/fix_av.sh

@ -10,7 +10,7 @@ export LD_LIBRARY_PATH="$LD_LIBRARY_PATH:${serverfiles}:${serverfiles}/linux64"
if [ "${postinstall}" == "1" ]; then
fn_parms(){
parms="--datapath ${avdatapath} --galaxy-name ${avgalaxy} --init-folders-only"
parms="--datapath ${avdatapath} --galaxy-name ${selfname} --init-folders-only"
}
fn_print_information "starting ${gamename} server to generate configs."

2
lgsm/functions/info_messages.sh

@ -1472,7 +1472,7 @@ fn_info_message_select_engine(){
fn_info_message_sof2
elif [ "${shortname}" == "sol" ]; then
fn_info_message_soldat
elif [ "${shortname}" == "st" ]; then
elif [ "${shortname}" == "sb" ]; then
fn_info_message_starbound
elif [ "${shortname}" == "sbots" ]; then
fn_info_message_sbots

11
lgsm/functions/query_gamedig.sh

@ -22,7 +22,6 @@ if [ "$(command -v gamedig 2>/dev/null)" ]&&[ "$(command -v jq 2>/dev/null)" ];
gamedigcmd=$(echo -e "gamedig --type \"${querytype}\" --host \"${ip}\" --port \"${queryport}\"|jq")
gamedigraw=$(gamedig --type "${querytype}" --host "${ip}" --port "${queryport}")
querystatus=$(echo "${gamedigraw}" | jq '.error|length')
fi
# server name.
@ -32,10 +31,14 @@ if [ "$(command -v gamedig 2>/dev/null)" ]&&[ "$(command -v jq 2>/dev/null)" ];
fi
# numplayers.
gdplayers=$(echo "${gamedigraw}" | jq -re '.raw.vanilla.raw.players.online')
if [ "${querytype}" == "minecraft" ]; then
gdplayers=$(echo "${gamedigraw}" | jq -re '.players | length-1')
else
gdplayers=$(echo "${gamedigraw}" | jq -re '.players | length')
fi
if [ "${gdplayers}" == "null" ]; then
unset gdplayers
elif [ "${gdplayers}" == "[]" ]; then
elif [ "${gdplayers}" == "[]" ] || [ "${gdplayers}" == "-1" ]; then
gdplayers=0
fi
@ -60,7 +63,7 @@ if [ "$(command -v gamedig 2>/dev/null)" ]&&[ "$(command -v jq 2>/dev/null)" ];
fi
# numbots.
gdbots=$(echo "${gamedigraw}" | jq -re '.raw.numbots')
gdbots=$(echo "${gamedigraw}" | jq -re '.bots | length')
if [ "${gdbots}" == "null" ]||[ "${gdbots}" == "0" ]; then
unset gdbots
fi

Loading…
Cancel
Save