Update sms.lua

This commit is contained in:
Ale32bit 2015-09-26 21:30:49 +02:00
parent d2fa5153e7
commit 7a831b0359

View file

@ -88,6 +88,7 @@ local function readMsg()
term.setCursorPos(1,1) term.setCursorPos(1,1)
term.write("Send: ") term.write("Send: ")
local msg = read() local msg = read()
local msg = base64.encode(msg)
term.clear() term.clear()
if msg == "/logout" then if msg == "/logout" then
term.redirect(mainTerm) term.redirect(mainTerm)
@ -148,7 +149,7 @@ local function recMsg()
t = textutils.unserialize(v) t = textutils.unserialize(v)
if t then if t then
date = t["date"] date = t["date"]
mesg = "<"..t["from"].."> "..t["message"] mesg = "<"..t["from"].."> "..base64.decode(t["message"])
printMsg(mesg) printMsg(mesg)
end end
end end