All you need is a reference to the ship that is sending the comms (what I've called 'NPCShip' in that sample), and the message to send. That will be the trickier part, I suspect - working out which ship is going to send what message, making sure they don't repeat themselves, making the messages varied.
That's not what I mean. What I mean is a live database of all the notable things certain commanders do, and a way of remembering which systems those facts spread to. For example, Pirate A survives the destruction of his team by Hunter B and runs into a rock hermit for repairs. Then all commanders who circulate through the rock hermit after Pirate A is inside get "infected" with tales of the ferocity of Hunter B. This, of course, only works while the system is loaded.
For unloaded systems one could abstract the flow of information. For each system, there would be one list of facts per role. The probability of information bleeding between role lists is proportional to the number of gal-cop-allied stations in the system, as they are the stations that permit (nearly) all types of commanders to enter.
To simulate the spreading of info between systems, a connectivity map would be generated for each role according to certain rules (for example, the trader role connectivity map would only connect two systems if they were reachable and if they could be traded between at a profit, and the galcop role connectivity map would only connect systems that are in range and have a lot of police) and the information spread across systems wold be limited to the connectivity maps of the roles that know that information. During this stage, redundant facts (facts that show up more than once in the same role list) are removed from their lists. These calculations are performed at each player witch-space jump, where lag is normal, with the exception of the connectivity maps, which should be generated only once and re-generated if they go missing. (Perhaps these could be pre-generated and included in the distribution of the OXP, but that would pump up file size).
There are also possibilities for conflicting facts, leading to conflicts. For example, Pirate Tom hates Leesti because he nearly died there, while Pirate Laura loves Leesti because she bought her new ship there. Tom tells Laura he hates Leesti, and Laura kills him for that. The rest of the pirates in the system then spread the word that Laura loves Leesti and creates a new fact that Laura killed Tom over a disagreement.
Player Jon blows away a huge pirate group, leaving only Pirate Tim and Pirate Matt as survivors. Pirate Tim creates the fact that Player Jon is merciful and good, and Pirate Matt creates the fact the Player Jon is a coward who couldn't finish off the pirate group. The two pirates chat and disagree, and Pirate Tim kills Matt and creates the fact that Matt died because of his big mouth. Player Jon witchspaces away to another system, and the system calculations begin.
First, for the intra-system spread. Pirate Tim's facts that Jon is merciful and Matt's big mouth killed him are added to System 1's Pirate facts list. Seeing as there are a moderate amount of GC-friendly dockable objects in System 1, only the fact that Jon is merciful bleeds over to another list. In this case, the fact bleeds over to the bounty hunter's list. Now it is time to calculate inter-system spread. First, the pirate connectivity map is referenced, spreading the facts of Matt's demise and Jon's mercy to the Pirate facts lists of Systems 2 and 3, the only systems accessible to pirates from System 1. Then, the Bounty Hunter connectivity map is referenced, causing the BH facts list of System 1 to spread the fact of Jon's mercy to the BH facts list of System 3. The redundancy check is then run. While System three has the merciful Jon fact in both the BH and Pirate lists, this is not an issue.
...Well, dang. I just planned out an OXP. Does anyone know of a good tutorial so I can get started on this? Is this even possible? I could see it being used to simulate diseases, as well. Perhaps other OXPs could use it, too.