Update buddies.lua
This commit is contained in:
parent
08c9ae64b6
commit
1afe5edb05
1 changed files with 3 additions and 3 deletions
|
@ -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")
|
||||||
|
|
Loading…
Reference in a new issue