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
1 changed files with 6 additions and 6 deletions

View File

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