mirror of
https://github.com/eliasstepanik/ark-ac-server-tools.git
synced 2026-01-14 03:38:27 +00:00
Fix a couple of potential issues with player count checking
This commit is contained in:
parent
fd26375770
commit
63ded49b30
@ -949,7 +949,7 @@ doWarn(){
|
||||
doBroadcastWithEcho "$warnmsg"
|
||||
for (( min = warnminutes - 1; min >= warninterval; min-- )); do
|
||||
numplayers=$(numPlayersConnected)
|
||||
if (( numplayers + 0 == 0 )); then
|
||||
if (( (numplayers + 0) == 0 )); then
|
||||
echo "Nobody is connected. Shutting down immediately"
|
||||
return 0
|
||||
fi
|
||||
@ -976,7 +976,7 @@ doWarn(){
|
||||
doBroadcastWithEcho "$warnmsg"
|
||||
if (( warnseconds >= 20 )); then
|
||||
numplayers=$(numPlayersConnected)
|
||||
if (( numplayers + 0 == 0 )); then
|
||||
if (( (numplayers + 0) == 0 )); then
|
||||
echo "Nobody is connected. Shutting down immediately"
|
||||
return 0
|
||||
fi
|
||||
@ -1114,7 +1114,7 @@ doUpdate() {
|
||||
fi
|
||||
elif [ "$updatetype" == "ifempty" ]; then
|
||||
numplayers=$(( $(numPlayersConnected) + 0 ))
|
||||
if (( numplayers == 0 )); then
|
||||
if (( numplayers != 0 )); then
|
||||
echo "${numplayers} players are still connected"
|
||||
return 1
|
||||
fi
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user