Patch 4.1: Addon Messages Will Be Filtered

Forum Avatar
Community Manager
#1 - March 12, 2011, 2:08 a.m.
Blizzard Post
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.

  • RegisterAddonMessagePrefix( <string> )

    • Returns a boolean if successful (could fail if it hits the client side limit of 512 prefixes).

  • IsAddonMessagePrefixRegistered( <string> )

    • Returns a Boolean if the prefix has been registered.

  • <table> GetRegisteredAddonMessagePrefixes( <table> )

    • 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.
Forum Avatar
Community Manager
#23 - March 14, 2011, 6:14 p.m.
Blizzard Post
Thank you very much for the excellent questions and further discussion.

03/11/2011 7:38 PMPosted by Naidi
Is there a possibility of getting an UnregisterAddonMessagePrefix?


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.

03/12/2011 12:19 AMPosted by Xinhuan
Also, the client has a 512 prefix limit but the server only recognizes the first 64?


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.

03/12/2011 12:19 AMPosted by Xinhuan
What happens exactly if 513 prefixes are registered?


The client has a hard cap (ie: once full it will not accept any more prefixes).

03/12/2011 12:19 AMPosted by Xinhuan
What happens exactly if 65 prefixes are registered ?


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.