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 component = require("component")
|
||||||
local event = require("event")
|
local event = require("event")
|
||||||
local t = component.tunnel
|
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
|
while true do
|
||||||
io.write("msg: ")
|
io.write("msg: ")
|
||||||
_, message = pcall(io.read)
|
_, message = pcall(io.read)
|
||||||
if message == "exit" then
|
if message == "exit" then
|
||||||
break
|
break
|
||||||
|
elseif message == "help" then
|
||||||
|
print(help)
|
||||||
end
|
end
|
||||||
t.send(message)
|
t.send(message)
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in a new issue