Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- -- Proxy Server v1.0
- rednet.open("top")
- while true do
- id, message = rednet.receive()
- if message == "PROXY_SERVER" then
- id2, message = rednet.receive(0)
- if id2 == id then
- local tWords = {}
- for match in string.gmatch( _sLine, "[^<PROXY>\t]+" ) do
- table.insert( tWords, match )
- end
- if #tWords >= 2 then
- local tID = tWords[1]
- local msg = {}
- for i=2,#tWords do
- msg[ #msg+1 ] = tWords[i]
- end
- local sMessage = table.concat( msg, "<PROXY>" )
- rednet.send( tonumber( tID ), sMessage )
- end
- end
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment