They do, when you add the global string of the message ("You are now queued in the Raid Finder.") to your pattern list.
from GlobalStrings.lua Lua Code:
|
Quote:
This is what i want to filter, but those just aren't: Code:
ROLE_CHANGED_INFORM = "%s is now %s."; |
Quote:
Move the print(message) to outside of the if-block and see what it says when someone sets their role. EDIT: Ok ok, it's not even a chat event, hah. :P Code:
ROLE_CHANGED_INFORM(changed, from, oldRole, newRole) Code:
RoleChangedFrame:UnregisterEvent("ROLE_CHANGED_INFORM") |
Ups, did not expect that ... for the records:
http://wowprogramming.com/utils/xmlb...L/RolePoll.xml Code:
<Frame name="RoleChangedFrame" parent="UIParent"> Lua Code:
|
Sure these are events, but as you can see, there's something sent to chat "ChatFrame_DisplaySystemMessageInPrimary"
There's no need to unregister the event, there has to be a way to just filter the message, right ? And the question is, why aren't the patterns catching them ? |
Quote:
Quote:
|
Code:
RoleChangedFrame:UnregisterAllEvents() But it bothers me. Why the filtering way wouldn't work. I mean, those messages are sent to CHAT_MSG_SYSTEM right ? So, if they are why can't i filter them there like just about anything else being sent to the chat ? |
Quote:
|
Quote:
Or not, i don't know :) |
Quote:
Also, you may want to change the last line in topattern to escape all the "magic characters", not just parentheses. For my purposes it didn't matter, but if you're using it on other global strings, it might matter. Code:
text = gsub(text, "([%(%)%.%%%+%-%*%?%[%^%$])", "%%%1") |
Quote:
Quote:
|
Quote:
|
All times are GMT -6. The time now is 11:39 AM. |
vBulletin © 2024, Jelsoft Enterprises Ltd
© 2004 - 2022 MMOUI