CurseBan
Current Version: 1.3.2.1
Recommended Build: 1.3.2-R1 (Craftbukkit build - 2377)
IMPORTANT: With 2.3.1b, matching has been changed. Please see the release notes for additional information
About
What is this?
Ever had a player flaming constantly? Or maybe you want to have a family-friendly server? Or you want to stop people from asking for diamonds? Now you don't have to worry about that anymore: CurseBan allows you to add "stalk words" - Whenever a player mentions one of them, he gets kicked. At the same time, the plugin keeps track of a "curse value" for every stalked words. This curse value is added to the players point count every time he uses such a word. You can define commands that should be executed once a user reaches a certain threshold, and a cooldown to remove points.
How does it work?
Every curse/banned word is assigned a certain point value. Every time a player uses one of these words, the word's point value is added to that players total count. Then, the command associated with that total value is executed. If none is associated, the next lowest is executed.
Commands, Permissions and Examples
Commands
- /cb - Displays help
- /cb list - Lists the current stalk words
- /cb add [word] <threshold> - Adds the word with that ban threshold to the list. If no threshold is given, 5 is used
- /cb remove [word] - Removes that word from the list
- /cb pardon [player] - Sets that player's kick count to 0 (Note: Will not unban if he has been banned)
- /cb pardon-all - Sets the kick count of all players to 0( Note: Will not unban if they have been banned)
- /cb save - Save all files to the disk. Handle with care, this will overwrite and changes made to the files that have not yet been reloaded.
- /cb set value [curse] [value] - Sets the curse point value of the curse
- /cb set matching [curse] [matchtype] - Sets the matching for this curse (Allowed: default, default-ignorecase, literal, literal-ignorecase, regex, regex-all-lower)
- /cb set kick [message] - Sets the default kick message
- /cb set command [value] [command] - Sets the command to be executed whenever a player reaches or passes value
- /cb listpoints [player] - displays points for a specific player (case sensitive)
Permission nodes
(Note that any node can be represented by its parent node - You can use cb.admin.* instead of typing in every node one by one)
- cb.admin.ignore - You won't get kicked for cursing
- cb.admin.pardon.all - Will set the kick count of all players back to zero. Will not unban them
- cb.admin.pardon.single - Will pardon single player. Also no unban
- cb.admin.add - Add curses to the list
- cb.admin.remove - D'uh
- cb.admin.save - Allows to save files
- cb.admin.set.value - Allows to set the curse points value of a banned word
- cb.admin.set.matching - Allows to set matching for a word
- cb.admin.set.kick - Allows to set the default kick message
- cb.admin.set.command - Allows to set a new or existing command to be executed when a point value is reached
- cb.list - Allows to see a list of all stalked curses
Example Usages
- Stop cursing: /cb add shit
- Stop people from typing in ALL CAPS: /cb add r:[A-Z]{3} will kick for 3 or more consecutive uppercase letters
- Give people diamonds if they say "supercalifragilistic": /cb add i:supercalifragilistic 9000, in the config file, put 9000: give %name% diamond 64;cb pardon %name%
Examples
/cb add shit - The list now contains the word shit, with default value 5
/cb list -> "[shit]"
/cb add fuck 10 - The list now contains the word fuck, with a value of 10
/cb list -> "[shit, fuck]"
/cb set command 0 kick %name% - Kicks a player whenever he swears and has more than 0 points (Basically, always) (Note that %name% is a variable used to represent the player's name)
/cb set command 10 jail %name% - Jails a player whenever he swears and has more than 10 points
Player A joins...
A: "This server is shit!" -> "shit" has a value of 5 -> A now has 5 points -> 0 < 5 < 10, so the "kick" command is executed
A rejoins...
A: "What the fuck, man?" -> "fuck" has a value of 10 -> A now has 15 points -> 10 < 15, so the "jail" command is executed
All this can also be done by editing the yaml files created in /plugin/CurseBan - see this page for more information: http://dev.bukkit.org/server-mods/curseban/pages/how-to-use-the-yml-files/
Misc
ToDo
- Add the ability to tell the player their bad word they said using %word% (You'd be able to add this to the jail sign (IE - Swearing: 'shit' ))
- Stop the server from overwriting files saved to the server by the server owner after a restart.
Changelog
v1.3.2.1:
- Changed version number to reflect current MC version it is configured for. (1.3.2) with additional build number for this (.1)
- Fixed issue 18 and 20 for issues with PlayerChatEvent (essentially replaced this even with AsycPlayerChatEvent) This seems to have resolved this issue, but I'm not entirely sure to be honest. Please report any issues you find to the ticket system. Do not post here.
Note this version will NOT work with tekkit servers. Use version 2.5.0 for Tekkit version 3.1.2.
v 2.5.0: -First release by new project owner GokouZWAR
- Fixed points being added to players instead of taking them away over time.
- Added console tracking for player's points so you can see when the system takes away player points, and how much was removed and when.
- Updated for Craftbukkit 1.2.5 - R4
- Added a few things on this page (commands that were missing, comments, and old missing revision information)
v 2.4.0: - (don't know if all these were added but I found these on the update page, possibly things he wanted added or had fixed in this version, not entirely sure. They were marked 2.4 so I'm going with this as the last updates. -GokouZWAR)
- (Hopefully) Fixed config not being saved on shutdown
- Fixed /cb set matching setting the wrong option
- Added: Logging to save methods
- Added: Reload command (/cb reload <all/config/curse/count>). Permission node: cb.admin.reload (alternatively, permission for one file only can be given by cb.admin.reload.<file>)
- Added: List command (/cb listpoints [player] - Player is optionally, omitting it will display all). Permission node: cb.admin.listpoints
- Added: Config option "save": Determines how files should be saved, in addition to the shutdown save:
- always: Save every file whenever it is modified
- config: Save the config file when modified
- curse: Save the curse file when modified
- count: Save the count file when modified
- Multiple options are possible: "save: config,curse"
v 2.3.3:
- Update to CraftBukkit 1.2.5-R1.0 (Phew, finally)
- Extended logging to include the message in which the word was found.
v 2.3.2:
- Updated to R6/1.2.3-R01
- Removed any deprecated API
- Included new matching, see release notes for more information
v 2.3.0:
- Added variable for the config file: %points% is replaced by the number of points the player has
- Implemented http://dev.bukkit.org/server-mods/curseban/tickets/8-log-chat-entry/ : Added "log-actions" option to the config file (default: true). This logs: The name of the player, the word that triggered the filter, the commands issued in return and the points of the player.
v 2.2.10:
- Moved the always-kick check behind any executed commands - This should fix bug #6 (http://dev.bukkit.org/server-mods/curseban/tickets/6-still-wont-ban-no-obvious-errors-tho/) which caused the plugin to not perma-ban people
v 2.2.9:
- Updated to 1.1-R3
v 2.2.8:
- Security patches
v 2.2.7:
- Command lists are now separated by both ";" and " ;"
- Version number displayed on startup and shutdown
v 2.2.6:
- Fixed Bug #2 (#3, #4): NullPointerException in onClientChat
v 2.2.5:
- Changed indenting of the .yml files
v 2.2.4:
- Fixed null-pointer-exception after using /cb pardon-all
- Added support for multiple commands
- Added /cb save
v 2.2.3:
- Updated to MC 1.0.* / CB 1.0.1-R1
v 1.2.3:
- Added cooldown (See: "How to use the .yml files")
- Added command: /cb set literal [curse] [true/false]
- Added permission node: cb.admin.set.literal
v 1.2.2 (Final and beta release notes merged):
- Updated to RB 1337
- Rework of the curse punishment system
- Switched everything to Yaml
- Added literal matching: A * in front of the word if using ingame commands, or the "literal-match" option in the Curses.yml
- Fixed Curses not being loaded properly (If you already added curses, but they arent showing up ingame, rename "Curse Point Value.yml" to "Curses.yml"
- Custom commands possible
v1.1.2:
- Updated to RB 1317
- Hopefully fixed PEX issue
- Skipped v1.1.1, derp
v1.1.0:
- Updated to RB 1240
v1.0.0:
- First release
Contact
Ticket here or contact me on www.mcnations.net. Email: administrator at mcnations Dot Net. Latest version in use will be on server.mcnations.net:25599 - running Tekkit.
Hey lookie! A forum got added! Posted a thread in there... Check it out.
I run a server for kids and this is exactly what I need!
Would it be worth having a forum or webpage on this plugin's pages for examples and samples?
To help kick it off here is my...
config.yml (Essentials required: warn->smite->burn->jail->mute->ban) http://pastebin.com/kBuBQp2m
Curses.yml (a basic 47 line starter) http://pastebin.com/PZK2Xaw6
For the record this is what my curses.yml file looks like on my server:
{'500': kick %name% Swearing. Our server is family friendly. No swearing please., cooldown-enabled: 'true', cooldown-time-min: '10', cooldown-stepsize: '1', def-kick-message: 'Kicked for swearing ', always-kick: 'false', cancel-chat: 'true', log-actions: 'true', '10': 'jail %name% 5 nearest Swearing ', '50': 'jail %name% 10 nearest BAN SOON SWEARING ', '100': 'tempban %name% 2 d Cursing - Come back in 2 days. Don''t swear anymore please. ', save: always}
This basically overrides the kick entirely by setting it to 500 initially so it never kicks the player. It only blocks their chat. Every word will get them 10 points no matter what so they always get jailed. If they aquire 50 points it adds a "Ban soon" to their jail sign, and then at 100 points it bans them for 2 days from the server.
@keytastic Actually i just read over your stuff you posted. That should be good. Just change the point value in the curses.yml file from 5 to 1 point for each word and you should be good to go.
@Boreeas
Thanks, but what I want is for players to get a point for each swear word and only get kicked when they reach 3 points.
@GokouZWAR
Yes, I made sure to edit it offline. The main problem I have is that the config file that generated looks very different from the default one on the how-to-use-yml page; I have no idea what the correct syntax should be. Here's what my config file looks like:
{'3': kick %name% Cursing (Automatic kick by CurseBan), save: always, cooldown-enabled: 'true', cancel-chat: 'true', cooldown-time-min: '5', cooldown-stepsize: '1', def-kick-message: Cursing, always-kick: 'false', '100': ban %name%, log-actions: 'true'}
I have always-kick set to false, because it was kicking players for having even 1 point, rather than waiting until they had 3. I edited the message (removing the "don't be hatin'") in case the server didn't like the apostrophe (you can't use apostrophes with the say command from the console).
Also, I appreciate the fast reply!
@keytastic
There is also the option
def-kick-message: Cursing (This happens automatically, don't be hatin')
This is only relevant if the always-kick option is set to true. If at any point a match is detected, and the always-kick option is set, the player will be kicked with the def-kick-message (Except if the player is disconnected by a command in the config before, e.g. kick for 0 points or ban for 100)
@keytastic
Stop your server and edit the config.yml file with the follow items:
always-kick: true 0: kick %name% <Whatever message you want here>
It should have by default this:
always-kick: true 0: kick %name% Cursing (This happens automatically, don't be hatin')
Key point to this is that you need to stop the server and edit the file while the server is offline. If you want alternatively you can edit the file offline, stop your server then save your file to the server and restart it for minimal downtime. If you don't, when you restart the server the files will be deleted.
Hi,
How do you set the default kick message? I noticed that the "how to use yml files" page has a default config file that doesn't match mine. When my players are kicked it just says "kicked by admin".
New version is out. I've cleared all the tickets in the system. Please update to the latest version before you submit a ticket. If you have problems please PM me on my website: http://www.mcnations.net or submit a ticket. I don't check this site that often yet so you're best bet to get in touch with me is join the tekkit server or PM me on the website.
If you want to try out curseban please feel free to join my tekkit server. Info is on the site.
Thanks a lot for taking this over, this is the best plugin I could find so far since the simple REG-EX matching suites all my needs perfectly! I've been totaly lost without it.
Good news, easy fix on the points stuff as expected. Look for new version here soon. Finalizing my testing now. I've also updated the page here to reflect new contact information and such for CurseBan. I've also added a few things I'd like to see on the to do list. Be nice to me with your suggestions and comments. Keep in mind I'm very new to java as was Boreeas when he started coding this. Should be a solid plugin here again soon.
I finally got the code. I'm going to make a shot at it and see if I can fix it so the points work properly at least. Not sure about going through and making full updates for it, but again, gonna take a stab at it.
is someone updating this??? i have an idea for the plugin..... instead of just banning someone for swearing too much they should get jailed for a set amount of time instead cause i dont wanna just have people being banned and then unbanning them when i want them back.... kinda pain in the butt.... i used swornjail plugin and it would be cool if curseban coudl work with swornjail
btw, i'm not sure if this is the case, but i did a test on the point system. I originally had mine setup to drop 1 point every 10 minutes, instead it's adding 9 points every 10 minutes. So maybe if I set my points to 11 instead of 1 it will drop one point instead of adding 9...not sure but maybe you guys could try to test that out.
It def seems like a calculation issue. I requested from boreas the source code but he hasn't answered yet...no idea. If anyone has any recent source code please PM me.
Hello,
This is not working with /msg
Is there a way to urn that on?
Thanks
Seems like a calculation error...so simple yet he can't fix it...I wish someone would take this over. Does anyone have an alternate mod that does the same as this one?
@Lightwave8
Yes, that's exactly what belongs into the config. But it is empty since 1.2.5R3. Must be a bug. http://dev.bukkit.org/server-mods/curseban/tickets/17-empty-config/ Please upvote my ticket!
is it possible to add a file where we can directly see and edit the actions taken for the different point levels? or is that what the empty config file is supposed to be?
@GokouZWAR
Yes, I've submitted a ticket for this and at least one other person has said they have the same problem. Somebody says "crap" and they get banned for 357 years. The worst part is that this is probably happening a lot but people can't let us know because they're temp banned for several decades. There are two problems, one is the the points going up, they seem to go up at roughly the same rate as they're supposed to go down, and the other problem is where huge values suddenly appear. I've gotten into the habit of doing /cb pardon-all on a weekly bases to make sure nobody is locked out. I average maybe 3 to 10 players and I see the huge point values at least weekly.