Fixes server "worlds backup" command.

It was not wrapped in server messages and "save off/on" stuff. Also
added output which shows how long the backup tool.
This commit is contained in:
Marcus Whybrow 2012-05-31 04:26:56 +01:00
parent 4a20e1bf1a
commit 0d6280ec57

14
msm
View File

@ -1635,7 +1635,21 @@ main() {
server_save_on $id
;;
backup)
if server_is_running $id; then
server_eval $id "say ${server_world_backup_started[$id]}"
server_save_off $id
server_save_all $id
fi
server_worlds_to_disk $id
server_worlds_backup $id
if server_is_running $id; then
server_save_on $id
server_eval $id "say ${server_world_backup_finished[$id]}"
fi
echo "Backup took $SECONDS seconds".
;;
*)
echo "Invalid command."