Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- --Lua code
- --using https://tweaked.cc/module/http.html#ty:Websocket:receive
- print("Startup!")
- local ws,err = http.websocket("ws://90.119.191.234:3738")
- print("Tried connecting.")
- if not ws then
- print("Error: ")
- printError(err)
- print("")
- end
- if ws then
- ws.send("Hades requesting {nf31o2jheqioefh9}")
- print("Connected")
- while true do
- local response = ws.receive(1)
- print(response)
- if not response == nil then
- splitstring = response.split(response, ' ')
- print("splitstring:")
- print(splitstring)
- shell.run(splitsring[1], splitstring[2])
- break
- end
- end
- ws.close()
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement