From d9c61565a344696ff65c4ce57dff0369306ec34e Mon Sep 17 00:00:00 2001 From: Ale32bit Date: Mon, 2 Nov 2015 21:35:55 +0100 Subject: [PATCH] Update sms.lua --- src/apps/sms.lua | 25 +++---------------------- 1 file changed, 3 insertions(+), 22 deletions(-) diff --git a/src/apps/sms.lua b/src/apps/sms.lua index f0e5168..cb63ff1 100644 --- a/src/apps/sms.lua +++ b/src/apps/sms.lua @@ -54,9 +54,6 @@ while true do else sendTo = tArgs[1] end - if sendTo == "" then - local getAllSMS = true - end local doesUserExist = http.post(server.."exists.php", "user="..sendTo).readAll() if doesUserExist ~= "true" then sPhone.winOk(sendTo.." does","not exist!", colors.lime, colors.green, colors.white, colors.lime) @@ -90,22 +87,8 @@ local function readMsg() term.setTextColor(colors.white) term.clear() term.setCursorPos(1,1) - if not getAllSMS then - term.write("Send: ") - else - term.write("Enter to exit") - term.setCursorBlink(false) - end - if not getAllSMS then - local msg = read() - else - - _,c = os.pullEvent("key") - if c == keys.enter then - term.redirect(mainTerm) - return - end - end + term.write("Send: ") + local msg = read() local msg = base64.encode(msg) term.clear() if base64.decode(msg) == "/logout" then @@ -162,9 +145,7 @@ local function recMsg() end end end - if not getAllSMS then - printMsg("Type /logout to exit") - end +printMsg("Type /logout to exit") while true do stream = http.post(server.."update.php",head) newMessages = {}