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.
@paulj1x
Hey, thanks for the friendly words.
Everything else you said is noted for the future.
@Mario00037
Do you edit the config while the server is running? That is not possible, because it will overwrite your changes the next time the server stops. A reload _might_ fix that, but I'm not really sure.
I can't seem to get this working with mcbans.
For the kick I want. tempban %name% 1 h
And for ban I want. ban &name% Go trash talk on some other server
But when I edit the config file it just resets to the original. What config would you recommend?
I'm getting a lot of these errors in the server log, there doesn't appear to be anything in particular causing these, they just happen at random times: [SEVERE] Could not pass event PLAYER_LOGIN to Curseban java.lang.NullPointerException at de.boreeas.curseban.listeners.CBLoginListener.onPlayerLogin(CBLoginListener.java:21) at org.bukkit.plugin.java.JavaPluginLoader$13.execute(JavaPluginLoader.java:349) at org.bukkit.plugin.RegisteredListener.callEvent(RegisteredListener.java:58) at org.bukkit.plugin.SimplePluginManager.callEvent(SimplePluginManager.java:339) at net.minecraft.server.ServerConfigurationManager.attemptLogin(ServerConfigurationManager.java:202) at net.minecraft.server.NetLoginHandler.b(NetLoginHandler.java:88) at net.minecraft.server.NetLoginHandler.a(NetLoginHandler.java:39) at net.minecraft.server.NetworkListenThread.a(SourceFile:94) at net.minecraft.server.MinecraftServer.w(MinecraftServer.java:527) at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:425) at net.minecraft.server.ThreadServerApplication.run(SourceFile:457)
One other feature that would be nice is if the yaml files were updated when the op does a /save-all. Right now they only appear to get updated if the server is stopped. Also if there is a mistake in the config.yml file it gets over-written with "NULL" and you have to start from scratch.
This is a great plugin!!!
What I would like to do is to:
mute players for 10 minutes at 5 points and tell them they've been muted for 10 minutes, and then;
mute them for 1 day at 10 points and tell them they've been muted for 1 day.
If you assign multiple commands for a point value it appears as though only the latest is used. Can I put a message after a mute command with a parameter? This is a little hard to test because it appears you have to restart the server for a new config.yml to take effect and I don't want to kick players to test, a reload command would be nice.
What do the cooldown time and stepsize do?
Is the following a valid config.yml and will it do what I'm trying to do?
{
'5': 'mute %name% 10m',
'5': 'say %name% muted for cursing for 10 minutes ',
cooldown-enabled: 'false',
'10': 'mute %name% 1d %name% muted for cursing for 1 day',
cooldown-enabled: 'true',
cooldown-time-min: '10',
cooldown-stepsize: '10',
'20': 'kick %name% You've been automatically kicked for repeatedly cursing ',
cooldown-enabled: 'true',
cooldown-time-min: '30',
cooldown-stepsize: '10',
'95': say %name% will be banned the next time he curses ',
'100': ban %name% You've been banned for cursing. ',
def-kick-message: '',
always-kick: 'false',
}
Thanks for your help and the very cool plugin!
Still great for tackling advertising spammers, I hope this does not go inactive
I don't know if other people use this for my purpose, but this looks great for autobanning spammers with a million accounts who like to log on my server and peddle whatever scam they have. I love that you can add the word and threshold in game.
@Dimitrias
In the default configuration, people are kicked everytime and banned at 100 points. Take a look at the config file:
Set this to false if you don't want your users ti get kicked everytime, in addition to any other command executed (jail, ban, etc). If you set this to true, also look at
This is the default kick message that is used to kick your users if always-kick is set to true.
Then, there is the following option:
This specifies that starting at 0 points, as long as the users hasn't passed any other marks, he will get kicked with "Some message"
is the next mark. If the user has 100 or more points, he will get banned when he curses.
You can put up any marks like that, with any value. The command to be executed can be written just like you would type it in-game, with the '/' in front removed and the name of the player replaced with '%name%'. Also, feel free to remove the marks at 0 and 100 points if you don't like them.
At what numbers are people banned/kicked/etc?
If its not there yet that I missed it, can you add a configuration what command to execute at what number?
@Silarn
Noted, thanks
He probably didn't fully reboot server.
I have only one suggestion which is an option to lower everyone's score at a configured time period.
So that you could punish people for cursing like sailors but don't run the risk of the occasional cursing building up to eventually ban someone who doesn't really deserve it.
This could be combined with a system that can (optionally) execute another command if someone falls below a defined threshold. So you could have it set up to mute someone at 50, every 5 minutes they are reduced by 10 points, and in 3 ticks (15 minutes) they will be unmuted by falling below 25 points.
@Joymo
Hi Joymo,
thanks for the report. What version of CurseBan were you using?
A few seconds after first time I enable this for testing ;)