Update sms.lua

This commit is contained in:
Ale32bit 2015-11-02 21:44:31 +01:00
parent d9c61565a3
commit fd265bb5a4

View file

@ -87,6 +87,7 @@ local function readMsg()
term.setTextColor(colors.white)
term.clear()
term.setCursorPos(1,1)
if sendTo ~= "" then
term.write("Send: ")
local msg = read()
local msg = base64.encode(msg)
@ -122,6 +123,16 @@ local function readMsg()
end
end
end
else
term.write("Press enter to exit")
while true do
local _, k = os.pullEvent("key")
if k == keys.enter then
term.redirect(mainTerm)
return
end
end
end
end
end
local function recMsg()
@ -145,7 +156,9 @@ local function recMsg()
end
end
end
printMsg("Type /logout to exit")
if sendTo ~= "" then
printMsg("Type /logout to exit")
end
while true do
stream = http.post(server.."update.php",head)
newMessages = {}