https://github.com/evolsoft/chatcensor
A powerful chat censoring plugin for PocketMine-MP
https://github.com/evolsoft/chatcensor
php plugin pocketmine-mp
Last synced: 7 months ago
JSON representation
A powerful chat censoring plugin for PocketMine-MP
- Host: GitHub
- URL: https://github.com/evolsoft/chatcensor
- Owner: EvolSoft
- License: mit
- Created: 2014-12-27T14:38:58.000Z (over 10 years ago)
- Default Branch: master
- Last Pushed: 2020-12-05T14:56:48.000Z (over 4 years ago)
- Last Synced: 2024-01-26T13:38:10.389Z (over 1 year ago)
- Topics: php, plugin, pocketmine-mp
- Language: PHP
- Homepage:
- Size: 49.8 KB
- Stars: 12
- Watchers: 7
- Forks: 7
- Open Issues: 3
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README

# ChatCensor
A powerful chat censoring plugin for PocketMine-MP
[](http://gestyy.com/er3sBt)
## Category
PocketMine-MP plugins
## Requirements
PocketMine-MP API 3.0.0
## Overview
**ChatCensor** let you block censored words, IP addresses, websites, spam, caps, set allowed and unallowed characters and mute/unmute players in chat.
You can also easily customize actions for each censored word.***Features:***
- *Word censor:* block censored words on chat or even on commands!
- *URL/IP censor:* prevent players from sending IP addresses or URLs on chat
- *Anti-caps:* remove caps from messages or block them
- *Anti-spam:* advanced anti-spam check which will prevent players from sending the same message twice or spamming on chat
- *Mute/Unmute players:* temporarily or permanently mute players on chat
- *Maximum message length:* prevent players from sending long messages
- *Allowed/Unallowed characters:* limit allowed characters on messages
- Customizable user-side messages**EvolSoft Website:** https://www.evolsoft.tk
***This Plugin uses the New API. You can't install it on old versions of PocketMine.***
## Donate
Please support the development of this plugin with a small donation by clicking [:dollar: here](https://www.paypal.com/cgi-bin/webscr?cmd=_donations&[email protected]&lc=US&item_name=www.evolsoft.tk&no_note=0&cn=&curency_code=EUR&bn=PP-DonationsBF:btn_donateCC_LG.gif:NonHosted).
Your small donation will help me paying web hosting, domains, buying programs (such as IDEs, debuggers, etc...) and new hardware to improve software development. Thank you :smile:## Documentation
**Configuration (config.yml):**
```yaml
---
# Censor settings
censor:
# Enable censor
enabled: true
# Let players with chatcensor.bypass.censor permission bypass this restriction
allow-bypassing: false
# Check bad words inside words (may slightly slow down your server)
advanced-mode: false
# Check commands
check-commands: false
# Log message to player
log-to-player: true
# Block messages containing URLs (a message will be sent to the player if log-to-player is enabled)
block-urls: true
# Block messages containing IP addresses (a message will be sent to the player if log-to-player is enabled)
block-ips: true
# Anti-caps settings
anti-caps:
# Enable anti-caps
enabled: true
# Let players with chatcensor.bypass.anti-caps permission bypass this restriction
allow-bypassing: false
# Log message to player
log-to-player: true
# Block the message (if block-message is disabled, the message will be converted to lower case)
block-message: true
# Anti-spam settings
anti-spam:
# Enable anti-spam
enabled: true
# Let players with chatcensor.bypass.anti-spam permission bypass this restriction
allow-bypassing: false
# Log message to player
log-to-player: true
# Spam checking mode (0 = the same message can't be repeated, 1 = delayed spam checking, 2 = both)
mode: 1
# Delay (in seconds)
delay: 5
# Mute/Unmute settings
mute:
# Log the mute message to the player
log-mute: true
# Log the unmute message to the player
log-unmute: true
# Log message to player
log-to-player: true
# Default mute time
time: "30m"
# Characters/Message checking settings
char-check:
# Enable characters/message checking
enabled: true
# Let players with chatcensor.bypass.char-check permission bypass this restriction
allow-bypassing: false
# Log message to player
log-to-player: true
# Maximum message length (set to 0 to disable this feature)
max-length: 0
# Allow backslash in messages
allow-backslash: false
# Allowed characters in messages (set to "" to disable this feature)
allowed-chars: "QWERTYUIOPASDFGHJKLZXCVBNMqwertyuiopasdfghjklzxcvbnm1234567890.:,;-_|!/?"
# Unallowed characters in messages (set to "" to disable this feature)
unallowed-chars: ""
...
```**Messages (messages.yml):**
```yaml
---
# No URLs message
no-urls: "{PREFIX} &cYou can't send URLs on messages!"
# No IP addresses message
no-ips: "{PREFIX} &cYou can't send IP addresses on messages!"
# No swearing message
no-swearing: "{PREFIX} &cPlease don't swear!"
# No caps message
no-caps: "{PREFIX} &cUppercase characters are not allowed on messages"
# Invalid/Unallowed characters message
invalid: "{PREFIX} &cYou can't send this message because it contains invalid characters"
# Message too long message
too-long: "{PREFIX} &cYou can't send this message because it's too long"
# No spam message
no-spam: "{PREFIX} &cPlease don't spam"
# Spam delay message
spam-delay: "{PREFIX} &cPlease wait &e{DELAY} seconds&c before sending another message"
# Muted message (when the muted player tries to send a message)
muted-error: "{PREFIX} &cYou can't send message because you are muted"
# Muted message
muted: "{PREFIX} &cYou have been muted for &e{DURATION}&c by &e{PLAYER}&c!"
# Unmuted message
unmuted: "{PREFIX} &cYou have been unmuted by &e{PLAYER}&c!"
...
```**Add and configure a denied word:**
1. Run the command "/addword <word>"
2. Go to ChatCensor plugin directory and open "words.yml" file
3. Find the world in the list and customize its settingsThese are the censored word settings:
```yaml
---
# Delete the message containing the word
delete-message: false
# Replace the censored word
enable-replace: true
# The text which will replace the censored word
replace-word: "****"
# List of commands to execute
# Available tags:
# - {PLAYER}: Player name of the player who sent the message containing the censored word
# Example:
# commands:
# - "tell {PLAYER} Do not swear please!"
# - "ban {PLAYER}"
commands: []
...
```**Commands:**
**Permissions:**
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
## API
Almost all our plugins have API access to widely extend their features.
To access ChatCensor API:
*1. Define the plugin dependency in plugin.yml (you can check if ChatCensor is installed in different ways):*
```yaml
depend: [ChatCensor]
```
*2. Include ChatCensor API in your plugin code:*
```php
//ChatCensor API
use ChatCensor\ChatCensor;
```
*3. Access the API by doing:*
```php
ChatCensor::getAPI()
```