Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- -- irc server v1 by username6
- rednet.open("left")
- print("Starting server")
- sleep(0.1)
- print(".")
- rednet.host("ircChannel", "ircServer")
- print(".")
- sleep(0.2)
- print(".")
- print("Server started with protocol 'ircChannel' and hostname 'ircServer'.")
- print("In server terminal. Call exit to shutdown")
- write("SRV>")
- input = read()
- if input == "exit" then
- rednet.unhost("ircChannel","ircServer")
- rednet.close("left")
- print("Shutting down...")
- sleep(3)
- os.shutdown()
- else
- print("Error! Unknown command!")
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement