Thread Tools Display Modes
04-17-13, 02:40 PM   #1
ChillerT
A Defias Bandit
Join Date: Apr 2013
Posts: 3
Cool Chat filter

Hello,

i'm looking for an Addon, which can block / hide some bad words and some systemmessages.
BadBoy dous not work. So are there other good Addons?

Or is there an easy way to write a small addon quickly for hiding one specific Systemmessage?

Thanks in Advance
  Reply With Quote
04-17-13, 06:27 PM   #2
Phanx
Cat.
 
Phanx's Avatar
AddOn Author - Click to view addons
Join Date: Mar 2006
Posts: 5,617
BadBoy is a spam blocking addon -- it only blocks gold selling ads, power leveling ads, and other actual spam like that. You probably want BadBoy_CCleaner, which lets you input a list of words to block. However, it won't block system messages, as it's designed to block player messages in public channels.

For system messages, something like this will work:
Code:
local SystemBlacklist = {
    "has come online",
    "has joined the raid group",
    "has defeated %S+ in a duel",
}
ChatFrame_AddMessageEventFilter("CHAT_MSG_SYSTEM", function(_, _, message)
    for i = 1, #SystemBlacklist do
        if strmatch(message, SystemBlacklist[i]) then
            return true
        end
    end
end)
If you can't use BadBoy_CCleaner for some reason (for example, if you need pattern/regex support) then you can do something similar for other message types:
Code:
local ChatBlacklist = {
    "grats",
    "ding",
    "other bad words",
}
local ChatEvents = {
    "CHAT_MSG_SAY",
    "CHAT_MSG_YELL",
    "CHAT_MSG_WHISPER",
    "CHAT_MSG_CHANNEL",
    "CHAT_MSG_GUILD",
    "CHAT_MSG_PARTY",
    "CHAT_MSG_RAID",
    "CHAT_MSG_INSTANCE_CHAT",
}
local function ChatFilter(_, _, message)
    for i = 1, #ChatBlacklist do
        if strmatch(message, ChatBlacklist[i]) then
            return true
        end
    end
end
for _, event in pairs(ChatEvents) do
    ChatFrame_AddMessageEventFilter(event, ChatFilter)
end
Use http://addon.ziuo.net/ to turn the above code snippets into addons.
__________________
Retired author of too many addons.
Message me if you're interested in taking over one of my addons.
Don’t message me about addon bugs or programming questions.
  Reply With Quote
04-18-13, 05:17 PM   #3
Dridzt
A Pyroguard Emberseer
 
Dridzt's Avatar
AddOn Author - Click to view addons
Join Date: Nov 2005
Posts: 1,360
Just adding that there is an addon workaround for the specific UIFrame* taint in the form of LibChatAnims (and embedded in BlizzBugsSuck)

It's not ideal but you don't have to 'live with it' until Blizzard fixes it (that could take a couple expansions if past taint history is any indication)
  Reply With Quote
04-19-13, 04:21 AM   #4
ChillerT
A Defias Bandit
Join Date: Apr 2013
Posts: 3
Thanks for your replys.
Because of i'm from Germany, i had problems to follow your conversation.
but the last Posts wouldnt help me.

I'm looking for a way to filter specific System-Messages. I dont need a beautiful Ingame-Control.
An Addon with just some single rows is all what i need.

I tried this tool "System Message Control Tool". But this tool just color my messages, and i'm not able to hide just one, two specific Messages.

So i need just some code, which hide System messages with specific letters. e.g.
if the System-message contained the words "system realm restart", please hide it, all other system messages show.

Do you know what i mean. Important is, that i dont want to use complete other chats like Chatter.

Thank you very much in advance
  Reply With Quote
04-19-13, 06:10 AM   #5
Dridzt
A Pyroguard Emberseer
 
Dridzt's Avatar
AddOn Author - Click to view addons
Join Date: Nov 2005
Posts: 1,360
Well if you don't want to use (or can't) Phanx's code you can give ErrorMonster a try.

It has an option to filter system messages and add custom filters.

You'll need to tick "load out of date" at the addon selection screen or edit the ##Interface: line in .toc to 50200.
  Reply With Quote
04-19-13, 12:33 PM   #6
ChillerT
A Defias Bandit
Join Date: Apr 2013
Posts: 3
Ok, sorry for that, but i think i have to read better...

local SystemBlacklist = {
"has come online",
"has joined the raid group",
"has defeated %S+ in a duel",
}
ChatFrame_AddMessageEventFilter("CHAT_MSG_SYSTEM", function(_, _, message)
for i = 1, #SystemBlacklist do
if strmatch(message, SystemBlacklist[i]) then
return true
end
end
end)
+ http://addon.ziuo.net/
= Works brilliant.... Thank you all very much :-*

Last edited by ChillerT : 04-19-13 at 01:12 PM.
  Reply With Quote

WoWInterface » AddOns, Compilations, Macros » AddOn Search/Requests » Chat filter


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