Auto Punisher

About this module

The Auto Punisher module automatically runs punishment commands on players who excessively trigger modules within a defined time frame.
Ops or players with the permission: "chatsentry.autopunisher.bypass" will be exempt to ONLY automatic warnings. For the manual warning exemption, see the permissions page.
Currently the only modules that support warnings are:
Chat Cooldown, Link & Ad Blocker, Word & Phrase Filter, Chat Executor, Unicode remover, Cap limiter, Anti Parrot, Anti chat flood, and Anti Statue Spambot
Manual = warnings that are applied manually via /cswarn <player>
Players module warnings can be manually cleared with /cswarnings clearmodulewarnings <player> <module name>
Players admin-given (manual) warnings can be cleared with /cswarnings pardonallmanual <player>
Note: You need a plugin to handle the punishment commands for muting, banning, etc. For the best results, use Essentials or MaxBans' punishment commands.

Config guide

You can access the below settings in the auto-punisher.yml file within the modules folder of the plugin's root folder.
Config excerpts taken from v3.6.0 and may not be completely up-to-date with the latest changes. To see the most up-to-date file, see below:

Under punishment nodes you can:

  • Use the format "{player_msg}: message" to send a message to the player.
  • Use the format "{console_cmd}: command" to run a command as the console.
  • Use the format "{player_cmd}: command" to run a command as the player.
  • Use the format "{broadcast}: message" to broadcast a message to all players.

Within the above formats, you can use:

  • "{PLAYER}" - players username for commands.
  • "{PLAYER_DISPLAYNAME}" - players display name with its original colors
  • "{PLAYER_DISPLAYNAME_STRIPPED}" - players display name stripped of its original colors
  • "{CURRENT_WARNS}" - players current warning count for the target module.
  • "{MAX_WARNS}" - maximum warning count for the target module.
enabled: true/false nodes determine whether a warning will be added to the player who triggered the module.

warning-lifetime

In hours, how often should one warning (on every module) expire from players?
Set this to -1 to never have warnings expire automatically. This will disable the below this option as well.
1
warning-lifetime: 23
Copied!

check-expiry-interval

In hours, how often (after startup) should the warnings file be scanned for expired warnings? Keep this at 1 unless you experience tick lag from ChatSentry.
Note that the file is also checked on every server startup.
1
check-expiry-interval: 1
Copied!

verbose-in-console

Should the Auto Punisher send a message to the console when it warns a player, auto expires a players warning, or runs punishment actions on a player?
1
verbose-in-console: true
Copied!

suppress-warnings-from-console

When enabled, pardon messages will be hidden from receiver players only if triggered by the console. The point of this is so players don't see when their warnings are reset when triggered by the last punishment set under a module.
1
suppress-pardons-from-console: true
Copied!

broadcast-manual-warnings

Should a broadcast be sent to everybody when a player is manually warned via /warn? (broadcast is configurable via the misc-lang.yml file)
1
broadcast-manual-warnings: true
Copied!

warning-config

IMPORTANT: The applicable above pardon command should be ran at the end (highest) warning count to reset the players warning count immediately to prevent them getting warning counts higher than the max punishment, allowing them to get infinite warnings without punishment.
1
warning-config:
2
manual:
3
enabled: true
4
punishments:
5
2:
6
- "{player_msg}: &cYou only have one warning remaining for the next 24 hours! Next time you'll be temporarily banned."
7
3:
8
- "{console_cmd}: ban {PLAYER} 12h Exceeded warnings"
9
- "{console_cmd}: cswarnings pardonallmanual {PLAYER}"
10
chat-cooldown:
11
enabled: true
12
punishments:
13
6:
14
- "{player_msg}: &cIf you keep violating the filter, you'll be muted! You've been warned."
15
12:
16
- "{console_cmd}: mute {PLAYER} 10m Chatting too fast"
17
- "{console_cmd}: cswarnings clearmodulewarnings {PLAYER} chat-cooldown"
18
link-and-ad-blocker:
19
enabled: true
20
punishments:
21
2:
22
- "{player_msg}: &cIf you violate the filter again, you'll be muted! You've been warned."
23
3:
24
- "{console_cmd}: mute {PLAYER} 1h Disallowed links/ips in chat."
25
- "{console_cmd}: kill {PLAYER}"
26
9:
27
- "{player_msg}: &cIf you violate the fiter again, you'll be banned! You've been warned."
28
10:
29
- "{console_cmd}: kill {PLAYER}"
30
- "{console_cmd}: tempban {PLAYER} 12h Disallowed links/ips in chat."
31
- "{console_cmd}: cswarnings clearmodulewarnings {PLAYER} link-and-ad-blocker"
32
word-and-phrase-filter:
33
enabled: true
34
punishments:
35
2:
36
- "{player_msg}: &cIf you violate the filter again, you'll be muted! You've been warned."
37
3:
38
- "{console_cmd}: mute {PLAYER} 1h Explicit language"
39
- "{console_cmd}: kill {PLAYER}"
40
9:
41
- "{player_msg}: &cIf you violate the fiter again, you'll be banned! You've been warned."
42
10:
43
- "{console_cmd}: kill {PLAYER}"
44
- "{console_cmd}: tempban {PLAYER} 1d Explicit language"
45
- "{console_cmd}: cswarnings clearmodulewarnings {PLAYER} word-and-phrase-filter"
46
chat-executor:
47
enabled: false
48
punishments: []
49
spam-blocker:
50
enabled: true
51
punishments:
52
3:
53
- "{player_msg}: &cIf you keep violating the filter, you'll be muted! You've been warned."
54
6:
55
- "{console_cmd}: mute {PLAYER} 1h Spam"
56
- "{console_cmd}: kill {PLAYER}"
57
9:
58
- "{player_msg}: &cIf you violate the fiter again, you'll be banned! You've been warned."
59
10:
60
- "{console_cmd}: kill {PLAYER}"
61
- "{console_cmd}: tempban {PLAYER} 12h Spam"
62
- "{console_cmd}: cswarnings clearmodulewarnings {PLAYER} spam-blocker"
63
unicode-remover:
64
enabled: true
65
punishments:
66
6:
67
- "{player_msg}: &cIf you violate the filter again, you'll be muted! You've been warned."
68
7:
69
- "{console_cmd}: mute {PLAYER} 1h Disallowed chat unicode"
70
- "{console_cmd}: cswarnings clearmodulewarnings {PLAYER} unicode-remover"
71
cap-limiter:
72
enabled: true
73
punishments:
74
3:
75
- "{player_msg}: &cIf you keep violating the filter, you'll be muted! You've been warned."
76
6:
77
- "{console_cmd}: mute {PLAYER} 1h Cap spam"
78
10:
79
- "{player_msg}: &cIf you violate the fiter again, you'll be banned! You've been warned."
80
11:
81
- "{console_cmd}: kill {PLAYER}"
82
- "{console_cmd}: tempban {PLAYER} 12h Cap spam"
83
- "{console_cmd}: cswarnings clearmodulewarnings {PLAYER} cap-limiter"
84
anti-parrot:
85
enabled: true
86
punishments:
87
2:
88
- "{player_msg}: &cIf you keep violating the filter, you'll be muted! You've been warned."
89
4:
90
- "{console_cmd}: mute {PLAYER} 1h Parroting players"
91
- "{console_cmd}: kill {PLAYER}"
92
5:
93
- "{player_msg}: &cIf you violate the fiter again, you'll be banned! You've been warned."
94
6:
95
- "{console_cmd}: kill {PLAYER}"
96
- "{console_cmd}: tempban {PLAYER} 12h Parroting players"
97
- "{console_cmd}: cswarnings clearmodulewarnings {PLAYER} anti-parrot"
98
anti-chat-flood:
99
enabled: true
100
punishments:
101
3:
102
- "{player_msg}: &cIf you keep violating the filter, you'll be muted! You've been warned."
103
6:
104
- "{console_cmd}: mute {PLAYER} 1h Excessive chat flood"
105
- "{console_cmd}: cswarnings clearmodulewarnings {PLAYER} anti-chat-flood"
106
anti-statue-spambot:
107
enabled: true
108
punishments:
109
3:
110
- "{console_cmd}: kick {PLAYER} Detected as statue spambot"
111
8:
112
- "{console_cmd}: tempban {PLAYER} 7d Statue spambot"
113
- "{console_cmd}: cswarnings clearmodulewarnings {PLAYER} anti-statue-spambot"
Copied!