From 7a8a91992cf8abf8e4ee86e08dbd060e6c32d1dd Mon Sep 17 00:00:00 2001 From: Marcus Whybrow Date: Fri, 20 Jul 2012 09:17:25 +0100 Subject: [PATCH] Added output for worlds list command, when there are no worlds. --- init/msm | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/init/msm b/init/msm index 5ceb18c..c72df3a 100755 --- a/init/msm +++ b/init/msm @@ -1308,6 +1308,11 @@ server_restart_now() { # List the worlds available for a server # $1: The ID of the server server_worlds_list() { + if [[ "${SERVER_NUM_WORLDS[$1]}" -eq 0 ]]; then + echo "There are no worlds in world storage." + return 0 + fi + local i="${SERVER_WORLD_OFFSET[$1]}" local max="$(( $i + ${SERVER_NUM_WORLDS[$1]} ))"