Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- -- Repeater 5GBPS / 7GBPS
- -- Gateway 80 (WEB door)
- input = "left"
- output = "right"
- modem = peripheral.wrap(input)
- modemout = peripheral.wrap(output)
- modem.setListening(80, true)
- modem.setListening(51, true)
- modemout.setListening(80, true)
- modemout.setListening(51, true)
- while true do
- event, side, id, chn, msg = os.pullEvent("lan_message")
- if chn == 80 then
- if msg == "sussy baka" then
- print("Error 404")
- else
- if side == "left" then
- modemout.sendChannel(80, msg)
- print("Send request "..msg.." to "..side)
- else
- modem.sendChannel(80, msg)
- print("Send request "..msg.." to "..side)
- end
- end
- event, sid, ids, ch, ms = os.pullEvent("lan_message")
- sleep(1.5)
- if ms == "sussy baka" then
- print("Error 404")
- else
- if sid == "left" then
- modemout.sendChannel(80, ms)
- print("Received response from 144.91.97."..ids)
- else
- modem.sendChannel(80, ms)
- print("Received response from 144.91.97."..ids)
- end
- end
- elseif chn == 51 then
- if msg == "sussy baka" then
- print("Error 404")
- else
- if side == "left" then
- modemout.sendChannel(51, msg)
- print("Send request "..msg.." to "..side)
- else
- modem.sendChannel(51, msg)
- print("Send request "..msg.." to "..side)
- end
- end
- event, sid, ids, ch, ms = os.pullEvent("lan_message")
- sleep(1.5)
- if ms == "sussy baka" then
- print("Error 404")
- else
- if sid == "left" then
- modemout.sendChannel(51, ms)
- print("Received response from 144.91.97."..ids)
- else
- modem.sendChannel(51, ms)
- print("Received response from 144.91.97."..ids)
- end
- end
- end
- sleep(0.1)
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement