don't crash if there's no owner
This commit is contained in:
parent
05cd830f98
commit
db057f02cf
|
@ -45,17 +45,14 @@ function api.update(pos, node)
|
||||||
if get_info then
|
if get_info then
|
||||||
local info = get_info(pos)
|
local info = get_info(pos)
|
||||||
if public == 0 then
|
if public == 0 then
|
||||||
local owner = meta:get("owner")
|
local owner = meta:get("owner") or "???"
|
||||||
meta:set_string("infotext", S("@1 (owned by @2)", info, owner))
|
meta:set_string("infotext", S("@1's private @2", owner, info))
|
||||||
|
|
||||||
elseif public == 1 then
|
elseif public == 1 then
|
||||||
meta:set_string("infotext", S("protected @1", info))
|
meta:set_string("infotext", S("protected @1", info))
|
||||||
|
|
||||||
elseif public == 2 then
|
elseif public == 2 then
|
||||||
meta:set_string("infotext", S("public @1", info))
|
meta:set_string("infotext", S("public @1", info))
|
||||||
|
|
||||||
else
|
|
||||||
meta:set_string("infotext", "ERROR IN INFOTEXT")
|
|
||||||
end
|
end
|
||||||
|
|
||||||
else
|
else
|
||||||
|
|
Loading…
Reference in New Issue