IRC bridge fixes.

This commit is contained in:
Izaya 2017-05-08 09:39:23 +10:00
parent 20caaa9cf7
commit 9d61f65fa0
2 changed files with 5 additions and 2 deletions

View File

@ -3,7 +3,10 @@ function ircb(h,p,n) -- host, port
s("IRC bridge connector", function()
local ip,h,p = component.proxy(component.list("internet")()),h,p
local c=ip.connect(h,p)
print("Connected: "..tostring(c.finishConnect()))
local ct = computer.uptime()
while computer.uptime() < ct+2 do
C.yield()
end
if c.finishConnect() then
local ct=computer.uptime()
print("Connected successfully.")

View File

@ -1,4 +1,4 @@
tM,nP,nID = {}, 4096, 1
tM,nP,nID = {}, 4096, "a"
for a,t in component.list("modem") do
table.insert(tM,component.proxy(a))
component.proxy(a).open(nP)