41 posts
Posted 24 November 2012 - 06:54 AM
so im using 2 diffrent things on red net one for logging a bank system and the other for a irc chat.
but the bank system is picking up the irc chat. How do i prevent that?
504 posts
Location
Seattle, WA
Posted 24 November 2012 - 07:01 AM
You could have a ping system setup that would vary depending on which script you were running.
For example, the bank system's ping could send a message to the receiving computer: 'bankingPing'
To which the receiving computer would respond with something like: 'returningBankingPing', thus establishing a connection between the two in which the
banking system would just use rednet.send() to only transfer data specifically between the two computers.
The same goes for your IRC program. You could have the users ping the server; if they are excepted by the server, then they will use rednet.send() to send information back and forth between the computers.
2088 posts
Location
South Africa
Posted 24 November 2012 - 07:06 AM
Are you using rednet.broadcast()?
1619 posts
Posted 24 November 2012 - 07:06 AM
Use rednet.send(id,msg), instead of rednet.broadcast().
41 posts
Posted 24 November 2012 - 07:30 AM
i have to use rednet.broadcast() cause if i dont it wont host its own server and people wont connect the irc system can host multiple channels.
1688 posts
Location
'MURICA
Posted 24 November 2012 - 07:35 AM
Perhaps in the broadcast, you could input a specific type of parameter so that receiving programs will know that it's meant for them, and not whatever rednet programs you have operating?
2088 posts
Location
South Africa
Posted 24 November 2012 - 07:54 AM
Do what CardingiSFun said. Make the first letter of the broadcast for who must accept, like I for irc ones. So rednet.broadcast("I"..msg) and then the rest of the message. Then on the recieve end use
o = msg:sub(1,1)
if o = "I" then
-- irc code
end
Then it will only do what ever you want if the first letter is I