1
1
mirror of https://git.shadowkat.net/izaya/OC-PsychOS2.git synced 2026-01-10 00:12:28 -05:00

Compare commits

...

4 Commits

7 changed files with 33 additions and 17 deletions

View File

@ -110,6 +110,7 @@ function dl.protos.http(host, optPort, path, dest, url) -- string string string
ns = R.read()
f:write(ns or "")
until not ns
R.close()
f:close()
print("Done.")
return true

View File

@ -38,6 +38,7 @@ function mtar.iter(stream) -- table -- function -- Given buffer *stream*, return
return
elseif nlen == 65535 then -- versioned header
version = string.byte(stream:read(1))
assert(versions[version], "Unknown version: " .. version)
nlen = string.unpack(versions[version].nlf, stream:read(string.packsize(versions[version].nlf)))
end
local name = cleanPath(stream:read(nlen))

View File

@ -15,3 +15,4 @@ function start()
end
end)
end
return {start=start}

View File

@ -21,5 +21,6 @@ function start()
state = false
end
end
end,"screenblank")
end, "screenblank")
end
return {start=start}

View File

@ -16,7 +16,10 @@ end
for addr in component.list("tape_drive") do
addNode(addr)
end
while true do
function start()
return os.spawn(function()
while true do
local tE = {coroutine.yield()}
if tE[1] == "component_added" and tE[3] == "tape_drive" then
addNode(tE[2])
@ -25,4 +28,7 @@ while true do
fs.remove("/dev/tape"..tostring(td[tE[2]]))
end
end
end
end, "tape-devfs")
end
return {start=start}

View File

@ -61,3 +61,4 @@ function start()
end
end,"termsrv")
end
return {start=start}

View File

@ -6,8 +6,10 @@ for modem in component.list("modem") do
component.invoke(modem,"setWakeMessage",message)
end
local ltime = computer.uptime()
while true do
function start()
return os.spawn(function()
local ltime = computer.uptime()
while true do
if computer.uptime() > ltime+delay then
for modem in component.list("modem") do
component.invoke(modem,"broadcast",port,message)
@ -15,4 +17,7 @@ while true do
ltime=computer.uptime()
end
coroutine.yield()
end
end, "WoLBeacon")
end
return {start=start}