sanitize network info a bit

This commit is contained in:
kepler155c@gmail.com 2019-04-20 12:34:45 -04:00
parent 3beae64ad8
commit 62a3bc1360
1 changed files with 4 additions and 0 deletions

View File

@ -124,6 +124,10 @@ Event.on('modem_message', function(_, _, sport, id, info, distance)
network[id].distance = distance
network[id].timestamp = os.clock()
if not network[id].label then
network[id].label = 'unknown'
end
if not network[id].active then
network[id].active = true
os.queueEvent('network_attach', network[id])