|
@ -70,7 +70,7 @@ minetest.register_chatcommand("creative_area_privs", { |
|
|
if not player then |
|
|
if not player then |
|
|
return false, "Player not found" |
|
|
return false, "Player not found" |
|
|
end |
|
|
end |
|
|
local found, _, area_id, privstring = param:find("^([+-]?%d+)%s*,%s*(.+)$") |
|
|
local found, _, area_id, privstring = param:find("^([+-]?%a?%d+)%s*,%s*(.+)$") |
|
|
if not found then |
|
|
if not found then |
|
|
return false, "Syntax error" |
|
|
return false, "Syntax error" |
|
|
end |
|
|
end |
|
@ -129,8 +129,8 @@ function switch_creative:decode_privs_string(str) |
|
|
end |
|
|
end |
|
|
|
|
|
|
|
|
function switch_creative:is_areas_mod(area_id) |
|
|
function switch_creative:is_areas_mod(area_id) |
|
|
local is_areas_id = string.sub(id, 1, 2) == "a_" |
|
|
local is_areas_id = string.sub(id, 1, 2) == "a" |
|
|
local a_id = tonumber( string.sub(id, 3) ) |
|
|
local a_id = tonumber( string.sub(id, 2) ) |
|
|
return is_areas_id, a_id |
|
|
return is_areas_id, a_id |
|
|
end |
|
|
end |
|
|
|
|
|
|
|
|