Update settings.lua

This commit is contained in:
Ale2610 2015-08-29 18:49:00 +02:00
parent 3127b95378
commit bece6eacca

View file

@ -1,7 +1,6 @@
local menu = { local menu = {
"Update", "Update",
"Change username", "Change PIN",
"Change password",
} }
local function clear() local function clear()
@ -23,18 +22,6 @@ local function header()
term.setTextColor(colors.black) term.setTextColor(colors.black)
end end
local function changeUsername()
header()
term.setCursorPos(2,3)
write("New Username: ")
local newUsername = read()
local f = fs.open("/.sPhone/config/username","w")
f.write(newUsername)
f.close()
sPhone.user = newUsername
print(" All Set!")
end
local function changePassword() local function changePassword()
while true do while true do
term.clear() term.clear()
@ -183,8 +170,6 @@ local function redraw()
elseif id == 1 then elseif id == 1 then
setfenv(loadstring(http.get("https://raw.githubusercontent.com/Sertex-Team/sPhone/master/src/installer.lua").readAll()),getfenv())() setfenv(loadstring(http.get("https://raw.githubusercontent.com/Sertex-Team/sPhone/master/src/installer.lua").readAll()),getfenv())()
elseif id == 2 then elseif id == 2 then
changeUsername()
elseif id == 3 then
changePassword() changePassword()
end end
end end