Create chat.lua
This commit is contained in:
parent
517b90e4f1
commit
12b85e40e2
1 changed files with 17 additions and 0 deletions
17
src/apps/chat.lua
Normal file
17
src/apps/chat.lua
Normal file
|
@ -0,0 +1,17 @@
|
||||||
|
term.setBackgroundColor(sPhone.theme["backgroundColor"])
|
||||||
|
term.clear()
|
||||||
|
term.setCursorPos(1,1)
|
||||||
|
term.setTextColor(sPhone.theme["text"])
|
||||||
|
sPhone.header("RedNet Chat")
|
||||||
|
term.setBackgroundColor(sPhone.theme["backgroundColor"])
|
||||||
|
term.setTextColor(sPhone.theme["text"])
|
||||||
|
term.setCursorPos(2, 5)
|
||||||
|
if not peripheral.isPresent("back") or not peripheral.getType("back") == "modem" then
|
||||||
|
print("Modem not found")
|
||||||
|
print(" Press any key")
|
||||||
|
os.pullEvent("key")
|
||||||
|
return
|
||||||
|
end
|
||||||
|
write("Host: ")
|
||||||
|
local h = read() term.setCursorPos(2,6)
|
||||||
|
shell.run("/rom/programs/rednet/chat", "join", h, sPhone.user)
|
Loading…
Reference in a new issue