forked from minetest-mods/areas
Minor cleanup
This commit is contained in:
@ -75,8 +75,7 @@ minetest.register_chatcommand("add_owner", {
|
||||
.." positions that have already been protected,"
|
||||
.." Use set_owner if you don't want the parent to be set."),
|
||||
func = function(name, param)
|
||||
local pid, ownerName, areaName
|
||||
= param:match('^(%d+) ([^ ]+) (.+)$')
|
||||
local pid, ownerName, areaName = param:match('^(%d+) ([^ ]+) (.+)$')
|
||||
|
||||
if not pid then
|
||||
minetest.chat_send_player(name, S("Invalid usage, see /help @1.", "add_owner"))
|
||||
@ -294,7 +293,7 @@ if areas.factions_available then
|
||||
if not id then
|
||||
return false, S("Invalid usage, see /help @1.", "area_faction_open")
|
||||
end
|
||||
|
||||
|
||||
if not areas:isAreaOwner(id, name) then
|
||||
return false, S("Area @1 does not exist"
|
||||
.." or is not owned by you.", id)
|
||||
@ -386,7 +385,7 @@ minetest.register_chatcommand("area_info", {
|
||||
area_num = area_num + 1
|
||||
end
|
||||
end
|
||||
table.insert(lines, S("You have @1 areas.", area_num))
|
||||
table.insert(lines, S("You have @1 areas.", area_num))
|
||||
|
||||
-- Area limit
|
||||
local area_limit_line = privs.areas and
|
||||
@ -418,4 +417,3 @@ minetest.register_chatcommand("area_info", {
|
||||
return true, table.concat(lines, "\n")
|
||||
end,
|
||||
})
|
||||
|
||||
|
Reference in New Issue
Block a user