4 posts
Posted 11 April 2017 - 11:07 PM
So, I programmed a simple 'Snooper' program which monitors rednet messages in the proximity and gives the chance to print them. I was going to publish it as a program for admin on servers to use, to potentially monitor what kind of messages are being sent. (I've included a pastebin link to my current code below)
However, I was wondering whether it would be possible to 'send' the different messages via hoppers for the different recipients ('targets' in the current code.)
Any help would be greatly appreciated.
Listener Program:
https://pastebin.com/CNvLwUyi
7083 posts
Location
Tasmania (AU)
Posted 12 April 2017 - 03:00 AM
I suppose you could have a turtle run the script. This'd be able to take pages it orders the printer to produce, and carry them to whichever container you wished to place them within.
Alternatively, given that you intend this script to be used by server admins, you could make use of
cPrint. This would allow you to have the script hand books directly to specified players (while also doing away with the need to provide paper and ink).
Note that your current script will only pick up on rednet messages that're either specifically sent to your system, or intentionally broadcast to all systems in the area. If you used your
modem's API directly you could have it listen on channel 65533, which (as of CC 1.6) mirrors
all rednet traffic.
4 posts
Posted 15 April 2017 - 06:32 PM
I suppose you could have a turtle run the script. This'd be able to take pages it orders the printer to produce, and carry them to whichever container you wished to place them within.
How would I do this? From everything I've looked up, I can't find any way of doing this. I've never programmed turtles before, either.
Note that your current script will only pick up on rednet messages that're either specifically sent to your system, or intentionally broadcast to all systems in the area. If you used your
modem's API directly you could have it listen on channel 65533, which (as of CC 1.6) mirrors
all rednet traffic.
Thanks for this, I updated the code with your suggestion
2427 posts
Location
UK
Posted 15 April 2017 - 09:15 PM
I've never programmed
turtles before…
Link added (kind of like how people add emphasis)