summaryrefslogtreecommitdiff
path: root/legacy.lua
diff options
context:
space:
mode:
authorShadowNinja <noreply@gmail.com>2013-09-03 01:33:08 -0400
committerShadowNinja <noreply@gmail.com>2013-09-03 01:33:08 -0400
commit7b0ff512f7f44fde11204e57f5b9b30ae550e4bb (patch)
tree61a8584c2320341858c9dc2c063e85743ba65195 /legacy.lua
parent3d866330bf01409e5113ece322e500aaa095417a (diff)
Shorten lines
Diffstat (limited to 'legacy.lua')
-rw-r--r--legacy.lua10
1 files changed, 4 insertions, 6 deletions
diff --git a/legacy.lua b/legacy.lua
index 9ff7c77..135e6dd 100644
--- a/legacy.lua
+++ b/legacy.lua
@@ -3,12 +3,11 @@
minetest.register_chatcommand("legacy_load_areas", {
params = "",
- description = "Loads, converts, and saves the areas from a legacy save file.",
- privs = {areas=true, server=true},
+ description = "Loads, converts, and saves the areas from"
+ .." a legacy node_ownership save file.",
+ privs = {areas=true, server=true, privs=true},
func = function(name, param)
minetest.chat_send_player(name, "Converting areas...")
- local startTime = os.clock()
-
err = areas:legacy_load()
if err then
minetest.chat_send_player(name, "Error loading legacy file: "..err)
@@ -36,8 +35,7 @@ minetest.register_chatcommand("legacy_load_areas", {
minetest.chat_send_player(name, "Table format updated.")
areas:save()
- minetest.chat_send_player(name, "Converted areas saved.")
- minetest.chat_send_player(name, "Finished in "..tostring(os.clock() - startTime).."s.")
+ minetest.chat_send_player(name, "Converted areas saved. Done.")
end})
-- The old load function from node_ownership (with minor modifications)