Guest User

Untitled

a guest
Oct 22nd, 2015
133
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.55 KB | None | 0 0
  1. local e = require("event")
  2. local component = require("component")
  3. local m = component.modem
  4.  
  5.  
  6. function test()
  7. print("Test Sucessful")
  8. end
  9.  
  10. function printMsg(e, laddr, raddr, p, d, type, usr, msg)
  11. type = type or " "
  12. if tostring(type) == "netnotify" then
  13. print("=======================================")
  14. print("NOTIFICATION from "..usr.." on "..raddr)
  15. print(msg)
  16. print("=======================================")
  17. end
  18. end
  19.  
  20. function start()
  21. m.open(1)
  22. e.listen("modem_message", printMsg())
  23. end
Advertisement
Add Comment
Please, Sign In to add comment