diff --git a/chatcommands.lua b/chatcommands.lua index dec28e5..2cf0f72 100644 --- a/chatcommands.lua +++ b/chatcommands.lua @@ -45,8 +45,8 @@ minetest.register_chatcommand("creative_region_privs", { end creative_regions.set_region_privs(tostring(region_id), privstring) - minetest.chat_send_player(name, "[creative_regions] Privstring set for region " .. region_id .. ": " .. privstring) creative_regions.save_regions() + minetest.chat_send_player(name, "[creative_regions] Privstring set for region " .. region_id .. ": " .. (privstring or "nil")) return true, "Done" end, }) diff --git a/items.lua b/items.lua index 681efa8..74a653d 100644 --- a/items.lua +++ b/items.lua @@ -114,14 +114,13 @@ if minetest.get_modpath("areas") then creative_regions.save_regions() num_removed = num_removed + 1 end - if num_removed == 1 then - minetest.chat_send_player(name, "[creative_regions] "..description.." removed for area " .. stored_id) - else - minetest.chat_send_player(name, "[creative_regions] Failed to remove privileges!") - minetest.log("warning", "[creative_regions] Failed to remove privileges for "..description..", area id "..stored_id.." at "..dump(pos)) - end end - + if num_removed == 1 then + minetest.chat_send_player(name, "[creative_regions] "..description.." removed for area " .. stored_id) + else + minetest.chat_send_player(name, "[creative_regions] Failed to remove privileges!") + minetest.log("warning", "[creative_regions] Failed to remove privileges for "..description..", area id "..stored_id..", at "..dump(pos)) + end end minetest.register_node("creative_regions:protector_nofly", {