summaryrefslogtreecommitdiff
path: root/chatcommands.lua
diff options
context:
space:
mode:
authorShadowNinja <noreply@gmail.com>2013-09-03 17:09:11 -0400
committerShadowNinja <noreply@gmail.com>2013-09-03 17:09:11 -0400
commitb1a4f878ef56b23d7e49051e361819b2f7e96e14 (patch)
tree59117d591acbf5bc1da4f03031582bde167288ae /chatcommands.lua
parent7b0ff512f7f44fde11204e57f5b9b30ae550e4bb (diff)
Fix rename_area and buildable_to nodes on the edges of areas
Diffstat (limited to 'chatcommands.lua')
-rw-r--r--chatcommands.lua5
1 files changed, 3 insertions, 2 deletions
diff --git a/chatcommands.lua b/chatcommands.lua
index 8a22887..2f320ff 100644
--- a/chatcommands.lua
+++ b/chatcommands.lua
@@ -144,14 +144,14 @@ minetest.register_chatcommand("rename_area", {
privs = {},
func = function(name, param)
local found, _, id, newName = param:find("^(%d+)%s(.+)$")
-
if not found then
minetest.chat_send_player(name,
"Invalid usage, see /help rename_area")
return
end
- index = areas:getIndexById(tonumber(id))
+ id = tonumber(id)
+ index = areas:getIndexById(id)
if not index then
minetest.chat_send_player(name, "That area doesn't exist.")
@@ -165,6 +165,7 @@ minetest.register_chatcommand("rename_area", {
areas.areas[index].name = newName
areas:save()
+ minetest.chat_send_player(name, "Area renamed.")
end})