Is there a way to order event callbacks (by plugin)?
View Single Post
12-30-14, 06:25 AM
Join Date: Mar 2006
1) Chat filters are processed in the order registered. There's no way to tell WoW to load your addon
some other addon (without modifying the other addon to list your addon as an optional dependency). If you really need to run your filters first (though I'm not really sure why; if you have some other addon blocking messages, it's still going to block messages if its filter gets run after yours) then depending on the addon it may be possible to
its filter (thus moving it to the end of the list) or you can take the nuclear approach and remove
other filters for the given event(s) and re-add them.
means the filter has
the message, and prevents any further processing for that message, including other filters.
means the filter did not block the message, and filters continue to be run in order.
3b) If a filter returns any arguments in addition to
it must return
of the event arguments that were passed into it (note that the first two arguments it receives are not event arguments and should not be returned) but it may modify them, and they replace the original event arguments. Additional filters are called with these new event arguments.
You can see how the default UI does this in
Finally, I assume you're talking about
Trade Chat Cleaner
since you just submitted some patches for it (thanks BTW) but I'm not really sure why you'd need it to run before other addons. Like I said, if you have some other addon blocking stuff, that stuff will still be blocked no matter what order the filters are run in.
Troubleshoot an addon
Turn any code into an addon
More addon resources
Need help with your code?
code! Attach or
Please don’t PM me
about addon bugs or code questions. Post a comment or forum thread instead!
View Public Profile
Send a private message to Phanx
Find More Posts by Phanx