Luna

Short Description
Luna is a developers tool for handling addon commutation between players. It allows any addon to register with it and send messages that go out over a single private chat channel and then returns any messages it sees for that addon. Messages will be added to a queue and be sent out one at a time in 2 second intervals to avoid the spam filter. This means that Luna is not for time sensitive messages or for rapid sending, but for syncing of data like resource node locations or quest data. It is inspired by the old Sky addon from WoW and as such has been named Luna to be a companion for Sol.

Features

 * Automatically connects to the Luna private channel to allow for the communication of your addon with other users of the addon
 * Register your addon's name and a function that the messages will be returned to
 * Queues messages to be sent at a first come first serve basis in 2 second intervals, to avoid the spam filter
 * Automatically breaks up long messages into multiple packets and recombines them on the other end
 * Adds messages into the body of a link so that the only text that appears in the ingame chat is, though the channel is hidden by default
 * If a received message is for an addon you have registered, then it will send the sender's name and message to the function you registered
 * You can register and unregister addons at any time after "VARIABLES_LOADED"(any sooner could be to soon), to allow for optional configuration of your addons
 * Luna will tell you when a newer version is out
 * Luna currently works for all clients.

Instructions for Addon Developers
(replace anything inside <> with your info) DO NOT add this addon's files into your addon, add it as a dependency in curseforge and label it as a dependency on your addons description

register the event "VARIABLES_LOADED" add this into your onevent function if event == "VARIABLES_LOADED" then if Luna then Luna.RegisterAddon(, ) else  DEFAULT_CHAT_FRAME:AddMessage("Luna not found, failed to register ") end end use this command to send a message out Luna.QueueMessage(, ) add this to handle receiving messages from others

function (sendername, message)  end note: messages and addonnames are strings, " and | characters will break the message, do not use them.

if you would like to unregister your addon then use this command Luna.UnregisterAddon

Download

 * Luna

Credits
Much of this code was inspired or rewritten from Alleris2_0's AddonManager and Vlocka's ModTrader. A big thanks goes to you two for your coding genesis.