adimanic
21-07-2008, 03:23 AM
I'm trying to make an extremely watered down version of ErrorMonster. I've constructed a simple chat filter using the AddMessageEventFilter API, but I can't for the life of me figure out which channel to filter. I know I'm close because when I filtered from the channel "CHAT_MSG_SAY" the text only appears in the chat bubble above my players head and not in the chat log, so I think it's filtering right, just not the right channel. Any help would be greatly appreciated.
function NoRSpam_setSysFilters()
Out("Setting Filters...");
local function myChatFilter(msg)
if(string.find(msg, "Not enough energy")) then
return true
end
end
ChatFrame_AddMessageEventFilter("UIErrorsFrame", myChatFilter)
end
function NoRSpam_setSysFilters()
Out("Setting Filters...");
local function myChatFilter(msg)
if(string.find(msg, "Not enough energy")) then
return true
end
end
ChatFrame_AddMessageEventFilter("UIErrorsFrame", myChatFilter)
end