Quantcast WoWInterface - View Single Post - SendChatMessage and illegal chars
View Single Post
12-24-12, 03:38 AM   #8
Phanx's Avatar
AddOn Author - Click to view addons
Join Date: Mar 2006
Posts: 5,616
Originally Posted by gmarco View Post
But frankly I don't understand how to write in others players GUILD/OFFICER/RAID channel using the AddMessage.
You can't.

Originally Posted by gmarco View Post
They both can write in my ChatFrames, but I don't understand IF AddMessage can write in other players GUILD/OFFICER/RAID/INSTANCE_CHAT like SendChatMessage does.
It can't.

Here's an example of how it works:

1. Someone (maybe you) uses the SendChatMessage function to send a message to the GUILD channel.

2. The server receives the message, and sends it back to every player who is in the same GUILD channel.

3. Your client receives the message, and fires the CHAT_MSG_GUILD event to inform the UI (including addons) that a message was received in the GUILD channel.

4. The default UI processes the CHAT_MSG_GUILD event, formats the mesage with the channel and sender names, and calls the AddMesssage method on each of the default chat frames that are configured to show messages in the GUILD channel.

AddMessage is a frame method, just like SetAlpha or ClearAllPoints, that all ScrollingMessageFrame type frames have. You can't call AddMessage for a chat frame on someone else's computer any more than you can call SetAlpha on a frame on someone else's computer.
Author/maintainer of Grid, PhanxChat, oUF_Phanx, and many more.
Troubleshoot an addon Turn any code into an addon More addon resources
Need help with your code? Post all of your actual code! Attach or paste your files.
Please dont PM me about addon bugs or code questions. Post a comment or forum thread instead!
  Reply With Quote