OC-PsychOS/modules/applications/login.lua

15 lines
246 B
Lua

function login()
local un,pw,cc = "","",false
print(MOTD)
if #os.users() > 0 then
repeat
io.write(net.id.." login: ")
un = io.read()
io.write("Password: ")
pw = io.read("*")
cc = os.su(un,pw)
until cc
return true
end
end