Quantcast
Intercept messages - WoWInterface
Thread Tools Display Modes
06-26-14, 10:55 AM   #1
Spawnova
A Warpwood Thunder Caller
 
Spawnova's Avatar
AddOn Author - Click to view addons
Join Date: Aug 2012
Posts: 96
Intercept messages

What would be a good way to check a message before it is shown in the chat box and decide whether it should be shown or discarded?
  Reply With Quote
06-26-14, 11:06 AM   #2
semlar
A Pyroguard Emberseer
 
semlar's Avatar
AddOn Author - Click to view addons
Join Date: Sep 2007
Posts: 1,059
ChatFrame_AddMessageEventFilter can be used to filter unwanted messages from the chat frame.

If what you want to do can't be done with that you can overwrite the chat frame's AddMessage function, but the other method is preferable.
  Reply With Quote
06-26-14, 11:13 AM   #3
Spawnova
A Warpwood Thunder Caller
 
Spawnova's Avatar
AddOn Author - Click to view addons
Join Date: Aug 2012
Posts: 96
That seems to work for my needs, thank you very much!
  Reply With Quote

WoWInterface » Developer Discussions » Lua/XML Help » Intercept messages

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off