You're going to have to pre-hook the chat frame's AddMessage method instead of using a chat filter. Chat filters are intended for changing the message text only; changing other values will have other (mostly undesirable) effects on how the chat system processes the message before displaying it in the chat frame. See PhanxChat for a working example.
__________________
Retired author of too many addons.
Message me if you're interested in taking over one of my addons.
Don’t message me about addon bugs or programming questions.
|