Update linkedSend.lua
This commit is contained in:
parent
97a5d306cf
commit
b4df3e4eac
1 changed files with 10 additions and 1 deletions
|
@ -1,12 +1,21 @@
|
|||
local component = require("component")
|
||||
local event = require("event")
|
||||
local t = component.tunnel
|
||||
print("exit - выйти")
|
||||
|
||||
local instr = "help - вывести все команды\nexit - выйти"
|
||||
local f = io.open("help.txt", "r")
|
||||
local help = f:read("*all")
|
||||
f:close()
|
||||
|
||||
print(instr)
|
||||
|
||||
while true do
|
||||
io.write("msg: ")
|
||||
_, message = pcall(io.read)
|
||||
if message == "exit" then
|
||||
break
|
||||
elseif message == "help" then
|
||||
print(help)
|
||||
end
|
||||
t.send(message)
|
||||
end
|
||||
|
|
Loading…
Reference in a new issue