made the login setup saner.
This commit is contained in:
parent
64d3958451
commit
61bf854539
@ -4,7 +4,6 @@ spawn("lua shell",function()
|
|||||||
_ENV = shutil.genenv()
|
_ENV = shutil.genenv()
|
||||||
coroutine.yield()
|
coroutine.yield()
|
||||||
log(pcall(login))
|
log(pcall(login))
|
||||||
print("\f"..MOTD)
|
|
||||||
print(_VERSION)
|
print(_VERSION)
|
||||||
while true do
|
while true do
|
||||||
write((os.getenv("PWD") or "").."> ")
|
write((os.getenv("PWD") or "").."> ")
|
||||||
|
@ -1,8 +1,9 @@
|
|||||||
function login()
|
function login()
|
||||||
local un,pw,cc = "","",false
|
local un,pw,cc = "","",false
|
||||||
|
print(MOTD)
|
||||||
if #os.users() > 0 then
|
if #os.users() > 0 then
|
||||||
repeat
|
repeat
|
||||||
io.write("\f"..MOTD.."\n"..net.id.." login: ")
|
io.write(net.id.." login: ")
|
||||||
un = io.read()
|
un = io.read()
|
||||||
io.write("Password: ")
|
io.write("Password: ")
|
||||||
pw = io.read("*")
|
pw = io.read("*")
|
||||||
|
Loading…
Reference in New Issue
Block a user