OETF#7 compatibility. Should complete #7.

This commit is contained in:
Izaya 2017-05-08 10:10:45 +10:00
parent 1cab6a3698
commit 5339f4ffe0

View File

@ -1,7 +1,7 @@
tM,nP,nID = {}, 4096, "a" tM,nP,nID,nVL = {}, 4096, computer.address(), 1
for a,t in component.list("modem") do for a,t in component.list("modem") do
table.insert(tM,component.proxy(a)) table.insert(tM,component.proxy(a))
component.proxy(a).open(nP) component.proxy(a).open(nVL)
end end
function ns(id,po,msg) function ns(id,po,msg)
h("sendmsg",id,po,msg) h("sendmsg",id,po,msg)
@ -11,11 +11,11 @@ s("network daemon",function ()
if ev[1] == "sendmsg" then if ev[1] == "sendmsg" then
local eT = ev local eT = ev
for k,v in ipairs(tM) do for k,v in ipairs(tM) do
v.broadcast(nP,eT[2],nID,eT[3],eT[4]) v.broadcast(nVL,nP,eT[2],nID,eT[3],eT[4])
end end
elseif ev[1] == "modem_message" then elseif ev[1] == "modem_message" then
if ev[6] == nID then if ev[7] == nID then
h("net_msg",ev[7],ev[8],ev[9]) h("net_msg",ev[8],ev[9],ev[10])
end end
end end
C.yield() C.yield()