1. #1
    Pandaren Monk
    Join Date
    Jun 2011
    Location
    Södermalm
    Posts
    1,920

    Addon similar to badboy with blacklist option

    Hello.
    Was bit unsure where to post this so if i placed it wrong, feel free to move it

    I'm looking for an addon similar to how badboy works, it removes spam before you even see it, great.
    Now i just need the added feature of blacklisting certain words, for me it would be stuff like:
    rbg, boost, pvp, arena, skype, recruit, recruiting etc.

    My goal is to remove all the rbg/arena boosters, anything pvp related and all guild recruiting spam in trade.
    I'm fine with it not being exact and hiding "more" then it should. I just cant stand all the endless spam in trade anymore

  2. #2
    Code:
    local filteredWords = {
        "rbg",
        "boost",
        "pvp",
        "arena",
        "skype",
        "recruit",
    }
    local ipairs = ipairs
    ChatFrame_AddMessageEventFilter("CHAT_MSG_CHANNEL",function(chatFrame,event,msg)
        for _,str in ipairs(filteredWords) do
            if msg:lower():match(str) then
                return true
            end
        end
        return false
    end)
    How to use. Untested. Should filter all "channels" (so General, Trade, LocalDefense etc., but not stuff like guild, party, instance, battleground etc.)
    Last edited by Treeston; 2013-01-13 at 04:18 PM.
    UI & AddOns expert | Interface & Macros moderator - My work

  3. #3
    Pandaren Monk
    Join Date
    Jun 2011
    Location
    Södermalm
    Posts
    1,920
    Quote Originally Posted by Treeston View Post
    Code:
    local filteredWords = {
        "rbg",
        "boost",
        "pvp",
        "arena",
        "skype",
        "recruit",
    }
    local ipairs = ipairs
    ChatFrame_AddMessageEventFilter("CHAT_MSG_CHANNEL",function(chatFrame,event,msg)
        for _,str in ipairs(filteredWords) do
            if msg:lower():match(str) then
                return true
            end
        end
        return false
    end)
    How to use. Untested. Should filter all "channels" (so General, Trade, LocalDefense etc., but not stuff like guild, party, instance, battleground etc.)
    I did serisouly wager to give you my unborn babies but ill settle with YOU'RE AWESOME!!
    Works like a charm but for some reason any trade message starting with a marker (such as the green triangle) it will not filter out.
    Any idea why ?

    Again, ty ty ty, it works awesomely, its like being on a low pop server, i can actually read stuff now

    Edit. Can i use wildcards to get around people writing stuff like [arena] / (arena) or should i just cover does aswell ?
    Last edited by Treeston; 2013-01-13 at 04:18 PM.

  4. #4
    I'm not sure about the triangle thing.

    It should already match "[arena]", since it matches any message containing one of the blacklisted words. So "recruit" would match "I am recruiting for my guild" as well as "Looking for recruits to form new RBG team".

    You can do wildcards with Lua patterns. You could look into this page if you want to learn how to make them yourself or just stick to the following:
    "." - any one character
    ".?" - any one character or no character
    ".+" - one or more characters
    ".*" - zero or more characters
    "%." - a literal dot

    There's some other special characters that need to be escaped (prefixed with a %). For example: Brackets, +, -, ? or *. Just post if you're unsure about something.
    UI & AddOns expert | Interface & Macros moderator - My work

  5. #5
    Pandaren Monk
    Join Date
    Jun 2011
    Location
    Södermalm
    Posts
    1,920
    Quote Originally Posted by Treeston View Post
    I'm not sure about the triangle thing.

    It should already match "[arena]", since it matches any message containing one of the blacklisted words. So "recruit" would match "I am recruiting for my guild" as well as "Looking for recruits to form new RBG team".
    Doesn't seem to work the way you describe.
    For example a warrior in trade is spamming this message and its supposed to be filtered out ?
    "[2]warrior: Ally Warrior FC looking for any fucking RBGs above 1700 cr"
    Is it case sensitive ?

    This is the words i've put in:
    Code:
    local filteredWords = {
        "rbg",
        "boost",
        "pvp",
        "arena",
        "skype",
        "recruit",
        "recruitment",
    Last edited by santa666; 2013-01-13 at 03:09 PM.

  6. #6
    It used to be. I fixed the code above to be non-sensitive.
    UI & AddOns expert | Interface & Macros moderator - My work

  7. #7
    Hello there (BadBoy author).
    Have you not tried BadBoy_CCleaner?
    Also note that fake RBG boost spam is infact being added to the main BadBoy addon, but they work around it now and then.
    Last edited by funkydude; 2013-01-14 at 04:11 PM.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •