[CHAT] WordFilter v1.0 - Lightweight chat filter plugin [1337]

Discussion in 'Inactive/Unsupported Plugins' started by Everdras, Jul 1, 2011.

  1. Offline

    Everdras

    WordFilter is now on BukkitDev.
    This page will no longer be updated.

    WordFilter- Filters Words.

    Version: v1.0

    Features:
    • Add/remove words to be filtered
    • List/clear words to be filtered
    • Default Bukkit Permission system
    • Toggle filtering on/off
    • Phrases can be filtered, use _'s wherever a space would be
    • Can choose between the three best filtering algorithms I came up with.
    Download: JAR
    Source Code: http://code.google.com/p/bukkit-word-filter/

    Changelog:
    Show Spoiler

    Version 0.2.0
    • can filter phrases
    • can choose between three options
    Version 0.1.2
    • Fixed a lot of stuff and did a lot of bug testing. Version 0.1.2 is confirmed to work.
    • Added so much logging your logs will be logging while they log, dawg.
    Version 0.1.1
    • Added clearing, listing
    • Allowed op's to bypass permissions
    • Changed save location
    Version 0.1.0
    • Initial release


    Permission Nodes:
    • WordFilter.add - allows player to add words
    • WordFilter.remove - allows player to remove words
    • Wordfilter.list - allows player to list words
    • WordFilter.toggle - allows player to toggle words on/off
    Usage:
    • /wf add originalword replacementword - sets originalword to be filtered to replacementword
    • /wf remove originalword replacementword - remove the filter on the originalword/replacementword combo
    • /wf list - lists all filtered words and their replacements
    • /wf clear - clears all listed words
    • /wf on - turns filtering on
    • /wf off - turns filtering off
    • /wf option X - replace X with REPLACE_ALL, REPLACE_PART, or REPLACE_WORD to set the filtering mechanism to that. See below for more info.
    About /wf option
    Show Spoiler

    • REPLACE_ALL - replaces the entire word if any part of the word matches a filtered String regardless of case
    • REPLACE_PART - replaces the part of the word that matches the filtered string, case sensitive
    • REPLACE_WORD - replaces the word with the filtered word if the whole word matches a filtered word, regardless of case


    Post any bug reports in this thread please.

    Do you enjoy what I do? Then click the spoiler below!
    Show Spoiler
    Show Spoiler
    Show Spoiler
    Show Spoiler

    I'm the Server Manager for ChiRho Entertainment. Stop on by, and stay and play if you like it!
    [​IMG]

    Also, I'm a college student! So, any small gifts you could part with to support my plugin development (and my habit of eating food) is enormously appreciated! Click here to donate via PayPal!

    (If you donate $5 or more, I'll personally write you a haiku. And if you mention it to me, I'll push updating the plugin of your choice (that I develop) to the top of my to-do list.)


    TODO:
    -Let wildcarding replace all this nonsense with using three different filtering algorithms. Hooray for elegance.

    KNOWN ISSUES:
    -filtering phrases doesn't work for REPLACE_ALL or REPLACE_WORD. Confirmed to work for REPLACE_PART, and filtering words into phrases always works.

    EDIT by Moderator: merged posts, please use the edit button instead of double posting.
     
    Last edited by a moderator: May 17, 2016
    Deathfromace likes this.
  2. Offline

    lipe123

    I'm going to add this tonight, glad someone came up with this.

    I already have a feature request tho:p

    Could you add something to allow a way to run other commands when a user triggers a certain amount of filter events?
    So for example a player swear 3 times in lets say.. 10min then the plugin triggers a /mute <player> ?
     
  3. Offline

    Everdras

    I'll look into it. It won't be able to mute via any other plugin, but it could mute them on its own.
     
  4. Offline

    Deathfromace

    Seems like a plugin I could use on my sever. I see on the to-do list there is a crash bug...is that still in?
     
  5. Offline

    Everdras

    I haven't tested it yet, unfortunately. I need to get around to trying it. Go ahead and give it a try after backing up your worlds, though this shouldn't be able to mess anything like that up. If you do, tell me what happens as well as any output to the log, please =)
     
  6. Offline

    Deathfromace

    I installed but all I get is
     

    Attached Files:

  7. Offline

    Everdras

    You need permissions. It was implied as a dependency, but I've clarified that now in the main post.

    Looks like the crash-on-load bug is fixed though. So hooray.
     
  8. Offline

    Deathfromace

    Ah I don't have anything that does permissions as I like to keep it simple :(

    Is there a way to make it not require permissions?
     
  9. Offline

    Everdras

    I did a lot of testing a bit ago, and can confirm a few things:

    -It works.
    -It's compatible with RB1000
    -/clear requires a reload to take effect. I'll try to fix this in the next update.
    -Crash-inducing bug is gone, or never existed... I wasn't able to reproduce it anyway.
    -Files are stored correctly.

    I'll try to fix that right now.

    EDIT: Fixing.
    EDIT: Done, should work.

    Fixed /clear needing a reload.

    EDIT by Moderator: merged posts, please use the edit button instead of double posting.
     
    Last edited by a moderator: May 17, 2016
  10. Offline

    Rabus

    Wildcards - in Polish when you swear you can use really MANY different words to say the same bad word...

    Like something*, and if you write somethingfdjgkjdg it will be changed to %$#^
     
  11. Offline

    Everdras

    Hm. I'll put it in the next release.
     
  12. Offline

    Deathfromace

    Thank you much for making it not require permissions.

    Would there be a way to simply make it block words? I tried just doing /wf add *word* *blank* but understandably that didn't catch.
     
  13. Offline

    Everdras

    Hrm. You can try replacing the word with just any character. so like /wf add troll -. To filter 'troll' into '-'

    IMO it's not a very good idea to just make the offending word vanish. It violates the Principle of Least Astonishment, in that it's more 'astonishing' or surprising to a person for the word to just totally vanish rather than for the word to just be filtered.
     
  14. Offline

    Deathfromace

    Yeah I took that idea and just turned it into -.
     
  15. Offline

    lipe123

    Loving the plugin one thing I'd love to see added if possbile.

    Essentials has a /me command that basically works like irc's /me and when saying stuf with /me its not filtered at all anymore.
     
  16. Offline

    Everdras

    I'll look into what I can do.
     
  17. Offline

    Deathfromace

    I think if people are going that far to bypass the filter you should warn or just ban them. I can't think of any word that could fit into a legit use of /me.
     
  18. Offline

    Everdras

    I don't think it'd actually even be possible without adding a whole 'nother listener to the plugin, because I'd have to monitor all commands sent out to plugins and scan those. And modifying any command going out to a plugin before the plugin can handle it sounds like a bad idea to me.
     
  19. Offline

    thefinaldegree

    If you add potatos|potatoes and then someone types:
    "I LOVE POTATOS", then it becomes: "I LOVE potatoes"
    The capitalisation doesn't pass through the filter, and you can't setup two filters like: 'potatos|potatoes' and 'POTATOS|POTATOES' at the same time.

    Other than that, it's a great plugin :p

    EDIT: emoticons all over my potatoes.
     
  20. Offline

    Everdras

    It ignores capitalization on purpose. It would be too easy to just capitalize one letter in the word for it to get around the filter.
     
  21. Offline

    thefinaldegree

    Was trying to say it should keep any capitalisation through the filter, but not too important.
    Also, if you wanted to block 'potatoes' someone can just write 'potatoes!' and it doesn't block it, thought you'd want to know?
     
  22. Offline

    Everdras

    Ah yeah, punctuation... I think what I may do is revert it to how it in my alpha version, where it replaced any section of the word that matched the filtered word.

    So if you filter "ass," @#ass@# will still filter. Only downside is words like assonance will also get hit too, though itll come out like:

    say ass filters to grapes.

    assonance -> grapesonance.
     
  23. Offline

    thefinaldegree

    That does sound like it could be a lot of fun :p
     
  24. Offline

    lipe123

    Scartch my "/me filter" idea i just disabled /me but here is a more pressing problem for me.

    lets say i filter poop then all you have to do is type "poop," ".poop " or even just "PoOp" the prev response touched the subject too.

    Now idk exactly how java does this but VB had a instr("word" , "string to find its position in") command, now to address the issue of getting "grapesonance" out of the way why not limit the surrounding chars after the word to 2 chars for example.
    Sooo
    1a. lcase("entire string") (to get rid of the obvious PoOp 's)
    1. find a match in the char string to the offensive word.
    2. count how many chars before and after the word until you find a space.
    3. if before_ and_ after_ char_count > 4 then dont filter
    4. else filter it.

    Easy enough to impliment?

    Option B:

    Create a config file with one option: Filter words even if they are part of others: true/false.

    I'd rather have grapesonance than f...sonance yourmotherf..... son of a.....!! ><
     
  25. Offline

    Everdras

    Expect an update within the next few days day hours now. Will be addressing some of the more popular issues.

    I haven't gotten to test anything yet, with my main server still being down for maintenance. Also, I made some changes to the data structure, so your old words may not carry over.
     
  26. Offline

    Deathfromace

    Thanks for the update.
     
  27. Offline

    Grrrr159

    How about hurting the player if they say banned words/phrases?
     
  28. Offline

    Everdras

    Beyond the scope of the plugin.
     
  29. Offline

    Grrrr159

    Awwww
     
  30. Offline

    Everdras

    Hotfixed a few bugs in the newest release.
     

Share This Page