|
|
@ -106,15 +106,19 @@ if minetest.get_modpath("areas") then |
|
|
|
local name = digger:get_player_name() |
|
|
|
|
|
|
|
local current_areas = areas:getAreasAtPos(pos) |
|
|
|
local num_removed = 0 |
|
|
|
for areas_id, areas_area in pairs( current_areas ) do |
|
|
|
local id = "a"..tostring(areas_id) |
|
|
|
if stored_id == id and privstring == creative_regions.region_privs[tostring(id)] then |
|
|
|
creative_regions.set_region_privs(id, nil) |
|
|
|
minetest.chat_send_player(name, "[creative_regions] "..description.." removed for area " .. id) |
|
|
|
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.." at "..dump(pos)) |
|
|
|
minetest.log("warning", "[creative_regions] Failed to remove privileges for "..description..", area id "..stored_id.." at "..dump(pos)) |
|
|
|
end |
|
|
|
end |
|
|
|
|
|
|
|