2017-09-07 13:12:10 +10:00
|
|
|
function login()
|
2017-09-09 21:26:29 +10:00
|
|
|
local un,pw,cc = "","",false
|
2017-09-14 16:21:32 +10:00
|
|
|
print(MOTD)
|
2017-09-14 15:12:00 +10:00
|
|
|
if #os.users() > 0 then
|
2017-09-09 21:26:29 +10:00
|
|
|
repeat
|
2017-09-14 16:21:32 +10:00
|
|
|
io.write(net.id.." login: ")
|
2017-09-09 21:26:29 +10:00
|
|
|
un = io.read()
|
|
|
|
io.write("Password: ")
|
|
|
|
pw = io.read("*")
|
2017-09-14 15:12:00 +10:00
|
|
|
cc = os.su(un,pw)
|
2017-09-09 21:26:29 +10:00
|
|
|
until cc
|
|
|
|
return true
|
2017-09-07 13:12:10 +10:00
|
|
|
end
|
|
|
|
end
|