Skip to content
everloot

Lore archive · Warcraft Wiki, 2023 dump

API C ChatInfo.SendAddonMessage

Last wiki revision 2023-08-22

Sends a message over an addon comm channel. success = C_ChatInfo.SendAddonMessage(prefix, message [, chatType, target]) = C_ChatInfo.SendAddonMessageLogged

  • prefix: - Message prefix, can be used as your addon identifier; at most 16 characters.
  • message: - Text to send, at most 255 characters. All characters (decimal ID 1-255) are permissible except NULL (ASCII 0).
  • chatType: - The addon channel to send to.
  • target: - The player name or custom channel number receiving the message for or chatTypes.
  • success: - True if the message was successfully sent. This is regardless of being registered to its prefix or any server-side throttling.
  • Recipients must register a prefix using to receive its messages via . This prefix can be max 16 characters long and it's recommended to use the addon name if possible so other authors can easily see which addon a registered prefix belongs to.

Addons transmitting user-generated content should use this API so recipients can report violations of the Code of Conduct.

  • Fires when receiving messages sent via this function.
  • The message has to be plain text for the game masters to read it. Moreover, the messages will silently fail to be sent if it contains an unsupported non-printable character. Some amount of metadata is tolerated, but should be kept as minimal as possible to keep the messages readable for Blizzard's game masters.
  • This function has been introduced as a solution to growing issues of harassment and doxxing via addon communications, where players would use addons to send content against the terms of service to other players (roleplaying addons are particularly affected as they offer a free form canvas to share a RP profiles). As regular addon messages are not logged they cannot be seen by game master, they had no way to act upon this content. If you use this function, game masters will be able to check the addon communication logs in case of a report and act upon the content. Users should report addon content that is against the terms of service using Blizzard's support website via the Harassment in addon text option.

Whispers yourself an addon message when you login or /reload

There is a server-side throttle on in-game addon communication so it's recommended to serialize, compress and encode data before you send them over the addon comms channel.

Serialize:

  • LibSerialize (stats)
  • AceSerializer

Compress/Encode:

  • LibDeflate (stats)
  • LibCompress (stats)

Comms:

  • ChatThrottleLib (docs, stats)
  • AceComm

The LibSerialize project page has detailed examples and documentation for using LibSerialize + LibDeflate and AceComm:

  • - Battle.net equivalent.

Source

https://warcraft.wiki.gg/wiki/API_C_ChatInfo.SendAddonMessage · retrieved 2023-11-13 · CC BY-SA 4.0

Converted from wikitext with templates, tables and images removed, so some sentences may be missing values.

This archive predates WoW: Forever. For collected gameplay facts see the Forever database. Search the archive.