Addon authors that use chat messages should check that their addons still work in 4.1
Authors will need to add calls to RegisterAddonMessagePrefix() in order to receive addon messages of a particular prefix, presumably during PLAYER_ENTERING_WORLD for the majority of addons. Note that this system errs on the side of sending too much; it is possible for addon messages to make it to the CHAT_MSG_ADDON handlers when no addon has registered it.
Returns a boolean if successful (could fail if it hits the client side limit of 512 prefixes). Returns a Boolean if the prefix has been registered. Returns a table (or you can pass in a table), that will be filled in with all prefixes that were registered. Prefixes are limited to 16 characters now, and they no longer take up a portion of the 256 character chat message limit. The server has a 64 prefix limit. If you exceed this limit your client will not filter any messages. Also: SendAddonMessage() is now allowed for the OFFICER channel. |
|
Thank you very much for the excellent questions and further discussion.
At this time we don’t really see a need for an unregister function. If one arises we can add that functionality. Right now we wanted to mimic add-on loading/unloading.
The difference between the client cap(512) and the server cap(64) are to allow us to raise the server cap (if we needed to), without a client patch.
The client has a hard cap (ie: once full it will not accept any more prefixes).
The server cap is currently soft. If you exceed the server cap you will get all add-on messages (ie: just like it has always worked up to now). The soft server cap is strictly for add-on author testing/debugging. It is not intended that an add-on would purposefully hit the soft cap in order to get "old functionality". If we see this system being abused we will make the server cap a hard cap, and limit the number of prefixes for all clients. |