any help much appreciated
os.pullEvent = os.pullEventRaw
term.clear()
term.setCursorPos(1,1)
print("This is a password server. There is no user interaction here.")
print("Please find a computer and login there.")
local firstCycle = true
local validSender = false
local modemSide = "left"
local valid = false
users = {"username1", "username2" }
passwords = {"password1", "password2" }
senders = { 1, 2, 3, 4 }
function bootUp()
rednet.open("right")
end
while true do
validSender = false
if firstCycle then
bootUp()
firstCycle = false
end
senderId, message, distance = rednet.receive()
for i,v in ipairs(senders) do
if v == senderId then
validSender = true
break
end
end
if validSender then
for i,v in ipairs(users) do
if message == v then
valid = true
password = passwords[i]
break
else
valid = false
end
end
if valid then
rednet.send(senderId, password, true)
end
end
end