I'm currently trying to understand addon communication. As I understand, you can either do the following;
- SendAddonMessage() to a preset channel (RAID, GUILD, WHISPER, OFFICER, PARTY, BATTLEGROUND)
- Send a message over a channel, and parse it out at the other end
The first is more 'secure' as it requires a prefix to be set and the messages aren't displayed publicly. The second is more free, but absolutely not secure, and anyone could imitate the addon messages.
My problem is that I'd like to create a "server wide addon" so to speak. By this, I mean that I want to create an addon that can communicate with other users of the same addon regardless of where they are. I have got one such idea;
- Addon joins a channel, unregistering the "CHANNEL_UI_UPDATE" event beforehand, and reregistering it afterwards
- Send message over the channel, and parse it at the other end
- SendAddonMessage() to each member of the channel in whisper
My problem with this is that it feels like I'm hacking around the real issue, and that sending messages over the channel still isn't 'secure'. More to the point, it's taking up a channel slot, and the user could always 'reenable' the display of messages sent to the channel. Is there any real solution to this issue? Do I have to abandon the idea completely because there's no elegant solution?
My idea was to find a way to deal with the spam of guild invites sent by SGI users (or rather, any guild invite since they all trigger the same event), and communicating the names of these players to other users of my addon (and thus when a new character is created, they get a list of people to automatically decline invites from - allowing each person to whitelist guilds, but still communicating who it was sent from in the event someone else wanted to blacklist those guilds).
I can understand why Blizzard have made addon comms work this way - creating a dedicated addon channel faction-wide [that is a valid SendAddonMessage() target] would create such heavy traffic as everyone and their mother would be posting on to it, and there's always a risk of addons getting crosstalk from each other.
So, any ideas? I'm really looking for a way to communicate with other users of my addon, regardless of being in the same party, raid, battleground, zone, etc. limited to faction (obviously this was implied regardless as an in-game limitation), but without taking up a chat channel slot.
I'm happy to abandon the idea if it's not possible, but I figured I'd ask and see if anyone more versed in the API could direct me. I don't have a problem creating the addon (I made something similar to this in my sandbox addon, but never released it publicly due to the concerns mentioned above), only finding a better way of handling comms.