Advertisement
rullendetull

ComputerCraft IRC server

Sep 4th, 2015
85
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.51 KB | None | 0 0
  1. -- irc server v1 by username6
  2. rednet.open("left")
  3. print("Starting server")
  4. sleep(0.1)
  5. print(".")
  6. rednet.host("ircChannel", "ircServer")
  7. print(".")
  8. sleep(0.2)
  9. print(".")
  10. print("Server started with protocol 'ircChannel' and hostname 'ircServer'.")
  11. print("In server terminal. Call exit to shutdown")
  12. write("SRV>")
  13. input = read()
  14. if input == "exit" then
  15. rednet.unhost("ircChannel","ircServer")
  16. rednet.close("left")
  17. print("Shutting down...")
  18. sleep(3)
  19. os.shutdown()
  20. else
  21. print("Error! Unknown command!")
  22. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement