[FUN/CHAT] Taboo v 0.2.2 - Ban words or phrases [1060]

Discussion in 'Inactive/Unsupported Plugins' started by ASCIIDuck, Jul 22, 2011.

  1. Offline

    ASCIIDuck

    Taboo - Making words taboo ( jar)
    Version: 0.2.2
    This is a very small plugin I designed to combat swearing, flamewars and overused memes on my server. While some people are strongly opposed to things like language filters, I like the ability to deter users from starting flamewars. It's also fun to set saying the word "Voldemort" to spawn zombies at the player's location.

    Features:
    • Configurable word bans and punishments
    • Punishments can be: strike with lightning, spawn 3 zombies, spawn giant or kick
    • Permissions can be used to apply a word filter to a group of people.
    • Flexible configuration.
    • Ability to have taboo words replaced with asterisks.
    Github


    https://github.com/ASCIIDuck/Taboo
    Jar link


    Changelog:
    Version 0.2.2
    • Changed permissions to use an includePermission and an excludePermission
    • Added explode to possible actions
    • Added word substitution patterns (have taboo word replaced with another)
    Version 0.2
    • Changed configuration format
    • Added the censor option, which replaces taboo words with asterisks.
    • Added Permissions support.
    Version 0.1
    • Released plugin.
    Future Features:
    • More actions (suggestions welcome)
    • Actions able to take parameters
    • More flexible program structure allowing for others to add their own actions.
    • In-game commands to modify Taboos.
    Readme


    Show Spoiler

    ====Configuration===
    The config.yml must be created manually at the time being (Taboo/config.yml in your plugins directory).

    The format is as follows:

    Code:
    <tabooname>:
        actions:
        - <action1>
        - <action2>
        patterns:
        - <bannedword1>
        - <bannedword2>
        excludePermission: <permissionNode>
        includePermission: <permissionNode>
    
    ==TabooName==
    The tabooname can be anything and is not used by any part of the code. It's just there to help you organize things. It is required.

    ==Actions==
    These list what happens when someone breaks the taboo. The current actions are:
    lightning: strike the player with a bolt of lightning
    kick: kick the player
    giant: spawn a giant at the players location
    zombies: spawn three zombies at the players location
    explode: an explosion at the player's position, half the strength of TNT

    ==Patterns==
    These are the words that are searched for. Each word is searched for in a player's message, ignoring case.
    If you set "word" to be taboo, it will match against "sword","password","crossword", etc. If you want it to only match word, define as follows:
    - '(^|\W)word(\W|$)'
    Also, you can define a pattern that will replace the taboo word with another word. To do this define the pattern like so:
    - 's/rofl/rolling on the floor laughing/'
    This will replace "rofl" with rolling on the floor laughing in the player's message before it is displayed.

    ==Permissions==
    Permissions are checked using the new, built in Bukkit Permissions. There are no plans to make this compatible with older permissions plugins.
    The node you specify will be prepended with "taboo.", so if you set the excludePermission to be "admin", the permission a user would need is "taboo.admin".
    If no includePermission is specified it will default to applying to everyone.


    ==Example===
    Code:
    politics:
        actions:
        - lightning
        patterns:
        - obama
        - glenn beck
        censor: true
        permission: nopolitics
    
     
    Massimo1993 likes this.
  2. Offline

    Plague

    title is missing description
     
  3. Offline

    Dimochka

    Github link → 404 (extra 'downloads/'?)
     
  4. Offline

    fatmarley

  5. Offline

    iPhysX

    I like this, hopefully the link will be fixed soon
     
  6. Offline

    ASCIIDuck

    I updated the github link, added another link to the jar file itself, it was in the original post but not very noticeable.
     
  7. Offline

    gasmaskboyz

    can it ban commands[creeper]
     
  8. Offline

    Massimo1993

    @ASCIIDuck

    hi excuse me but you can add some feature to your fantastic plugin?

    1) add a permissions for admin for don't do kick or other wen spooke taboo word
    2) add a command in game ex: /tabboadd FUCK
     
  9. Offline

    VeryInsane

    Does this work yet? It would be really helpful.
     
  10. Offline

    ASCIIDuck

    @Massimo1993
    I've added the permissions, but kind of in the opposite direction of what you asked for. What I mean is a permission will opt the player into the taboo group. I'm going to be adding some flexibility to this later. The command interface will be added this weekend probably.
     
  11. Offline

    sacredrose

    would it be possible to add a feauture that allows you to replace a banned word when spoken.
    so for example someone says fuck and it is replaced with any word you want like pony or something.
     
  12. Offline

    ASCIIDuck

    @sacredrose It's currently only possible to have the words replaced by four asterisks (using the censor option), but I can work to make it a bit more flexible.
     
  13. Offline

    KrypleFyte

    ok so I installed the plugin and setup the config file:

    Code:
    main:
    actions:
     - kick
    patterns:
     - damn
     - monkey
    permission: main
    censor: false
    No one gets kicked or struck for anything but the log shows

    Doing onPlayerChat in TCL
    Kryplefyte has spoken taboo.

    Any idea how to fix it?
     
  14. Offline

    DarthNomad

    I´ve got the same bug, would be nice if someone could fix it, because i think this would be a great plugin.
     
  15. Offline

    ASCIIDuck

    @KrypleFyte @DarthNomad using that configuration file (after I changed the spacing to be proper) but I was unable to replicate your problems. First make sure your yml file is formatted correctly (I just realized now that the forums sort of mangles the spacing and I'll try to fix that in a minute). If that isn't the problem, are you using the CB1000? Are you using the Bukkit Permissions or are you still using one of the older Permissions plugins?
     
  16. Offline

    KrypleFyte

    I am using groupmanager because bukkit permission breaks 11 other plugins I use. and I am on CB1000.
     
  17. Offline

    ASCIIDuck

    @KrypleFyte okay, right now I only support the bukkit perms. Just remove the permission option and it will default to applying to everyone.
     
  18. Offline

    Mathew Alden

    I love this.

    I would love it even more with new punishments. :D
    exploding, instantaneous combustion, being teleported to a cave far below ground...
     
  19. Offline

    Cyberpew

    For some reason, it will not generate a config folder on load. Is it not supposed to?
     
  20. Offline

    SBHouse

    I can't seem to get the quotation entries to work. For example, if I add:

    - ' word ' (dash space ' space <word> space ')

    If I add that, I can still type "word" and "crossword" and neither one of them trigger the lightning.

    But if I put:

    - word

    Then I get struck for using "word" or "crossword." (I didn't want to use actual swearing as examples)

    What am I doing wrong?
     
  21. Offline

    ASCIIDuck

    @SBHouse
    Apologies, that was actually bad advice on my part. Rather do this: - "(^|\W)word(\W|$)"
    I'll update the README to include this info, as for why you need to do it this way: moon magic.

    A better answer:
    I'm using regular expressions on the chat messages (regular expressions are a powerful way to match strings, basically). In Java's regular expressions \W means a "non-word character", so a space, a period, anything except a-z, A-Z and 0-9. The ^ means the start of the line and $ means the end of the line. So What the regular expression winds up matching is (The start of the line OR a non-word character)word(a non-word character OR the end of the line).


    @Cyberpew
    Currently the plugin does not auto-generate a configuration file. This is because I can't really think of what would be a suitable default configuration file, as not everyone would use this plugin for the same reason.
     
  22. Offline

    Cyberpew

    Another question, does this plugin allow for a word to be auto corrected? Example: Changes the word "Test" to "Test1".

    If it does not, does anyone know of any plugins that can do so? I have seen it on the Reddit Public Minecraft server.
     
  23. Offline

    ASCIIDuck

    @Cyberpew
    Currently it cannot substitute words like that. I am currently planning out how to approach that in terms of configuration and code though.
     
  24. Offline

    SBHouse

    @Cyberpew

    http://forums.bukkit.org/threads/chat-wordreplace-6-1-a-simple-word-replacing-plugin-1000.17661/

    @ASCIIDuck

    I'm more confused now. Is this exactly how I want to enter things on the list? In which case, would I want to have entries, like this:

    -"(^|\W)word(\W|$)"
    (which would flag "word" but not "crossword" and not "password" or "wording")

    -"(^|\W)hell(\W|$)"
    (which would flag "hell" but not "shell" or "hello")

    Is that correct? To be sure that I'm reading exactly should be in my config file, is that?

    dash quote parenthesis carrot pipe backslash W parenthesis <word> parenthesis backslash W pipe dollarsymbol parenthesis quote

    And the rest of the entries can simply by like this?

    - <word>
     
  25. Offline

    ASCIIDuck

    @SBHouse
    Yeah, put it in just like that. Just make sure there is a space after the hyphen, or the configuration parser will error out.
     
  26. Offline

    SBHouse

    @ASCIIDuck

    One more thing. Your example in the thread used a " and your example in the README uses a '. Which is it?
     
  27. Offline

    ASCIIDuck

    @SBHouse
    Use single quotes( so use ' not "). Sorry, I've been responding to these while cooking and I didn't notice I wsa using double quotes.
     
  28. Offline

    ASCIIDuck

    @Massimo1993
    I have modified permissions to work better. Now there are two permissions options, an includePermission and an excludePermission. This will probably work more along the lines you were asking about. Refer to the README for more information.

    @sacredrose @Cyberpew
    It is now possible to have taboo words replaced with other words. Refer to the README for more information.

    @Mathew Alden
    I've added explode as an action. I plan on adding a teleport and combustion later. More ideas are always welcome of course :)
     
  29. Offline

    Massimo1993

    @ASCIIDuck

    you can add some in game command if possible
     
  30. Offline

    mottley007

    When i use this pluggin and run the server i don't get the config file. Am i do something wrong?
     

Share This Page