|
|
@ -70,7 +70,7 @@ minetest.register_chatcommand("creative_area_privs", { |
|
|
|
if not player then |
|
|
|
return false, "Player not found" |
|
|
|
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 |
|
|
|
return false, "Syntax error" |
|
|
|
end |
|
|
@ -129,8 +129,8 @@ function switch_creative:decode_privs_string(str) |
|
|
|
end |
|
|
|
|
|
|
|
function switch_creative:is_areas_mod(area_id) |
|
|
|
local is_areas_id = string.sub(id, 1, 2) == "a_" |
|
|
|
local a_id = tonumber( string.sub(id, 3) ) |
|
|
|
local is_areas_id = string.sub(id, 1, 2) == "a" |
|
|
|
local a_id = tonumber( string.sub(id, 2) ) |
|
|
|
return is_areas_id, a_id |
|
|
|
end |
|
|
|
|
|
|
|