Wireless: bugfixes

This commit is contained in:
upsilon 2017-04-27 17:01:35 +02:00
parent 9b61effa60
commit b403e6e9ab
No known key found for this signature in database
GPG Key ID: A80DAE1F266E1C3C

@ -76,7 +76,7 @@ function set_channel(pos, channel)
local meta = minetest.get_meta(pos)
local owner = get(wireless_meta.owners, pos.z,pos.y,pos.x)
if owner or owner == "" then
if not owner or owner == "" then
return
end
@ -102,15 +102,15 @@ function set_channel(pos, channel)
end
local function register_wireless(pos)
local owner = get(wireless_meta.owners, pos.z,pos.y,pos.x)
if not owner or owner == "" then
local meta = minetest.get_meta(pos)
local owner = meta:get_string("owner")
if owner == "" then
return
end
set_owner(pos, owner)
local channel = get(wireless_meta.channels, pos.z,pos.y,pos.x)
if channel and channel ~= "" then
local channel = meta:get_string("channel")
if channel ~= "" then
set_channel(pos, channel)
end