MudkipTheEpic

BugFixing

Feb 9th, 2013
126
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.33 KB | None | 0 0
  1. local listeners={}
  2. local function waitForListeners(pass)
  3. while true do
  4. event, id,msg=os.pullEvent("rednet_message")
  5. if msg == pass then
  6. rednet.send(id, "Granted")
  7. if not listeners[id] then listeners[id] = true end
  8. elseif msg == "exit" and listeners[id] == true then
  9. listeners[id] = nil
  10. else
  11. rednet.send(id, "Denied")
  12. end
  13. end
  14. end
Advertisement
Add Comment
Please, Sign In to add comment