Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- print("Starting CDT service...")
- n = peripheral.wrap("top")
- rednet.open("top")
- serverID = 0
- os.loadAPI("APIs/server")
- local function clear()
- m.clear()
- m.setCursorPos(1, 1)
- end
- --server.TestConnection("true")
- server.connect("cdtserver", "cdtauthorization")
- senderID, message, distance = rednet.receive()
- if message == "login" then
- print("Connection done!")
- senderID, message, distance = rednet.receive()
- connected = true
- else
- print("Fail")
- end
- while connected do
- senderID, message, distance = rednet.receive()
- if message == "cdt-start" then
- print(senderID, " Wants to start a connection. Allowing...")
- rednet.send(senderID, "start")
- senderID, message, distance = rednet.receive()
- print(senderID, ": Selection: 1")
- recovery = fs.open("/cdtservice/startup", "r")
- lent = 0
- for i in recovery.readLine() do
- lent = lent + 1
- end
- print("lent")
- end
Advertisement
Add Comment
Please, Sign In to add comment