Advertisement
killer64

SGControl

Jul 26th, 2013
80
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.40 KB | None | 0 0
  1. local p=peripheral.wrap("back")
  2. while true do
  3.     local r=p.getDialledAddress()
  4.     if r~="" and p.isInitiator()~="true" then
  5.         local a=http.post("http://71.238.152.180:8080/stargate",r)
  6.         if a then
  7.             local s=a.readAll()
  8.             print(s)
  9.             if s=="deny" then
  10.                 p.disconnect()
  11.             end
  12.         else
  13.             p.disconnect()
  14.         end
  15.         while p.getDialledAddress()==r do
  16.             sleep(2)
  17.         end
  18.     else
  19.         sleep(2)
  20.     end
  21. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement