mirror of
https://github.com/minetest-mods/areas.git
synced 2024-09-28 07:20:36 +02:00
Raise 'invalid use' error if no faction_name is given
This commit is contained in:
parent
e2bd0e9e55
commit
3800868b40
|
@ -292,8 +292,9 @@ if areas.factions_available then
|
|||
local params = param:split(" ")
|
||||
|
||||
local id = tonumber(params[1])
|
||||
local faction_name = params[2]
|
||||
|
||||
if not id then
|
||||
if not id or not faction_name then
|
||||
return false, S("Invalid usage, see /help @1.", "area_faction_open")
|
||||
end
|
||||
|
||||
|
@ -302,7 +303,7 @@ if areas.factions_available then
|
|||
.." or is not owned by you.", id)
|
||||
end
|
||||
|
||||
local faction_name = params[2]
|
||||
|
||||
if not factions.get_owner(faction_name) then
|
||||
return false, S("Faction doesn't exists")
|
||||
end
|
||||
|
|
Loading…
Reference in New Issue
Block a user