Update buddies.lua

This commit is contained in:
Ale32bit 2015-10-06 21:47:10 +02:00
parent 08c9ae64b6
commit 1afe5edb05

View file

@ -47,9 +47,8 @@ local function add()
if y == 1 and x == w then if y == 1 and x == w then
return return
end end
elseif e == "char" then
local add = read()
end end
add = read()
term.setCursorBlink(false) term.setCursorBlink(false)
--local check = http.post("http://sertex.esy.es/check.php","user="..add).readLine() --local check = http.post("http://sertex.esy.es/check.php","user="..add).readLine()
@ -79,8 +78,9 @@ local function remove()
return return
elseif y ~= 1 then elseif y ~= 1 then
if users[y-1] then if users[y-1] then
local user = users[y-1]
if sPhone.yesNo("Remove "..users[y-1].."?",nil,false) then if sPhone.yesNo("Remove "..users[y-1].."?",nil,false) then
table.remove(users, users[y-1]) table.remove(users, user)
local f = fs.open("/.sPhone/config/buddies", "w") local f = fs.open("/.sPhone/config/buddies", "w")
for i = 1, #users do for i = 1, #users do
f.write(users[i].."\n") f.write(users[i].."\n")