mirror of
https://github.com/msmhq/msm.git
synced 2024-08-30 18:12:35 +00:00
Replaced while loops with for loops in world list and backup functions.
This commit is contained in:
parent
85c66fc0ab
commit
24714b1dea
7
init/msm
7
init/msm
@ -1311,15 +1311,13 @@ server_worlds_list() {
|
||||
local max="$(( $i + ${SERVER_NUM_WORLDS[$1]} ))"
|
||||
|
||||
# For each of the servers worlds:
|
||||
while [[ "$i" -lt "$max" ]]; do
|
||||
for ((i=$i; i<$max; i++)); do
|
||||
world_property "$i" INRAM
|
||||
if "${WORLD_INRAM[$i]}"; then
|
||||
echo "[RAM] ${WORLD_NAME[$i]}"
|
||||
else
|
||||
echo "[DSK] ${WORLD_NAME[$i]}"
|
||||
fi
|
||||
|
||||
i="$(( $i + 1 ))"
|
||||
done
|
||||
}
|
||||
|
||||
@ -1330,12 +1328,11 @@ server_worlds_backup() {
|
||||
local max="$(( $i + ${SERVER_NUM_WORLDS[$1]} ))"
|
||||
|
||||
# For each of the servers worlds:
|
||||
while [[ "$i" -lt "$max" ]]; do
|
||||
for ((i=$i; i<$max; i++)); do
|
||||
world_property "$i" STATUS
|
||||
if [[ "${WORLD_STATUS[$i]}" == "active" ]]; then
|
||||
world_backup "$i"
|
||||
fi
|
||||
i="$(( $i + 1 ))"
|
||||
done
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user