1
0
mirror of https://github.com/ShadowKatStudios/OC-Minitel.git synced 2024-12-28 11:18:05 +11:00
OC-Minitel/RPC/OpenOS/usr/bin/exportcomponent.lua

16 lines
368 B
Lua
Raw Normal View History

local component = require "component"
local rpc = require "rpc"
local tA = {...}
2019-12-25 16:50:52 +11:00
if #tA < 1 then
print("Usage: exportcomponent <component address> [component address...]")
end
for k,v in ipairs(tA) do
local px = component.proxy(component.get(v))
print(px.type.."_"..px.address)
for l,m in pairs(px) do
rpc.register(px.type.."_"..px.address.."_"..l,m)
end
end