01-24-12, 05:42 PM | #1 |
Chat Filters
Hello again! Looking for some help with people familiar with the chat filtering functions. Basically here's what I'm trying to accomplish. I author an addon that can send chat messages... These messages can be customized, their content changes dynamically (like "time left" is different every time), and there can be any given number of them based on how many the user has added. In other words, there is no static list of messages or patterns that can be filtered for.
So, since I can't predict what needs to be filtered out, my goal now is to make a new addon that can collect and store each message that needs to be filtered out as it is received. I'm making modifications to the existing addon to use AceComm to notify the new addon that a message that needs to be filtered as been sent, and with the exact text of the message. As is, the new addon successfully receives these notifications and stores each of the messages in a table. The table is then used in a filtering function to hide the message. Problem is there is some sort of timing issue that's causing me trouble. When I send a message to be filtered, it won't filter it the first time... but if the identical message shows up again to be filtered, it will filter it the next time. It's like there's a lag between the addition of the messages to be filtered to the filter table and when that table is actually used to filter... Problem is the message is sent just before the addon notification is sent to filter it, so there is no time to wait for lag. Please let me know if you can see where this issue is stemming from... I assume there's something I need to do to make the filtering wait until the filter table is ready, or make it re-apply itself. Here's the code of the addon. I've got some Print()'s in there for debugging, don't mind those. PHP Code:
|
|
01-24-12, 05:59 PM | #2 |
And.... I think I just figured it out.
The first addon needs to send the notification of a message that needs to be filtered for FIRST, before the message is actually sent. I made this small change and things appear to work perfect. Although I am still curious if there's any other concern for timing... like right in my test, the notification was sent to me via the addon whisper channel, just before the message itself was sent to me in whisper. I ASSUME this forces the timing to be in sequence, such that the filter must be recieved before the message is displayed because both use the whisper channel. Would this hold true if the notification was sent to the addon Raid channel, while the message itself was sent to SAY? Or is there potential that the message in SAY is received before the filter notification is received, even though the notification was sent first? |
|
01-28-12, 04:24 AM | #3 |
well if memory serves correctly. AceComm communicates between different clients (two different WoW Windows) and therefore it uses throttling to communicate between lanes of chat messages. Meaning that in order to prevent the server from kicking you for sending too much data in one cycle, it breaks the message apart. Now even if this message is short enough to send over in one packet, AceComm would still use its timing function to send the message.
So sending the alert to make and addition to the filter, then in the same cycle send the message, it can't possibly send the filter update in time. That is assuming I remember what AceComm was used for
__________________
Chat Consolidate is the solution to any out of control trade chat. Ignore lines, throttle chat, consolidate posts!Follow the link to find out how! ▲ ▲ ▲ WoWInterface wont let me triforce >.> |
|
WoWInterface » Developer Discussions » Lua/XML Help » Chat Filters |
«
Previous Thread
|
Next Thread
»
|
Display Modes |
Linear Mode |
Switch to Hybrid Mode |
Switch to Threaded Mode |
|
|