A comprehensive chat management and moderation plugin for Half-Life/GoldSrc servers, built with NuggetMod framework. This plugin provides advanced chat filtering, player management, and administrative tools to maintain a healthy gaming environment.
- Profanity Filter: DFA-based (Deterministic Finite Automaton) word detection with customizable dictionary
- Auto-Moderation: Automatic ban system for repeated violations
- Player Management: Ban, kick, and gag commands with persistent storage
- Chat Logging: Complete chat history tracking with SQLite database
- Admin System: Role-based permission system
- Name Filtering: Prevents players from joining with inappropriate usernames
- Download the latest release
- Extract files to your game server directory:
<game_directory>/ ├── addons/ │ └── chatengine/ │ ├── dlls/ │ │ └── e_sqlite3.dll (or .so/.dylib) │ ├── config.json │ └── censor_words.dic - Configure the plugin (see Configuration section)
- Restart your server
The main configuration file is located at addons/chatengine/config.json.
{
"censor": {
"ignoreCharacters": [" ", "\t", "#", "!", "@", ...],
"niceWords": ["I love this server", "Great game!", ...],
"censorReplacement": "*",
"maxLimitPerGame": 5,
"banDurationMinutes": 30,
"censorWordsFilePath": "addons/chatengine/censor_words.dic"
},
"language": {
"lang": {
"yes": "Yes",
"no": "No",
"player.banned": "You have been banned for {0} minutes",
...
}
},
"chatTrigger": ["!", "/", "\\"],
"sqlStoragePath": "addons/chatengine/chatengine.db",
"commandPrefix": "cte_",
"showPlayerInfoOnDisconnect": 1
}| Option | Type | Default | Description |
|---|---|---|---|
ignoreCharacters |
string[] | [" ", "\t", "#", ...] |
Characters to ignore during profanity detection |
niceWords |
string[] | ["I love this server", ...] |
Replacement phrases for censored messages |
censorReplacement |
string | "*" |
Character used to replace profanity |
maxLimitPerGame |
int | 5 |
Maximum violations before auto-ban |
banDurationMinutes |
int | 30 |
Auto-ban duration in minutes |
censorWordsFilePath |
string | "addons/chatengine/censor_words.dic" |
Path to profanity dictionary file |
| Option | Type | Default | Description |
|---|---|---|---|
chatTrigger |
string[] | ["!", "/", "\\"] |
Prefixes that trigger command parsing in chat |
sqlStoragePath |
string | "addons/chatengine/chatengine.db" |
SQLite database file path |
commandPrefix |
string | "cte_" |
Server console command prefix |
showPlayerInfoOnDisconnect |
int | 1 |
Display player info on disconnect (0=off, 1=SteamID, 2=SteamID+IP) |
Create a censor_words.dic file with one word/phrase per line:
badword1
badword2
...
The DFA algorithm will automatically handle variations with ignored characters.
All commands can be executed from:
- Server console:
<commandPrefix><command> - Client console:
<commandPrefix><command> - In-game chat:
!<commandPrefix><command>(or other configured triggers)
| Command | Arguments | Permission | Description |
|---|---|---|---|
help |
- | Player | Display all available commands |
ban |
<SteamID> <Minutes> [Reason] |
Admin | Ban a player (use -1 for permanent) |
removeban |
<SteamID> |
Admin | Remove a player's ban |
kick |
<SteamID> [Reason] |
Admin | Kick a player from the server |
gag |
<SteamID> <Minutes> [Reason] |
Admin | Mute a player (use -1 for permanent) |
removegag |
<SteamID> |
Admin | Remove a player's gag |
Server Console:
cte_ban STEAM_0:1:12345678 60 "Spamming"
cte_kick STEAM_0:1:87654321 "Inappropriate behavior"
cte_gag STEAM_0:1:11111111 30
cte_removeban STEAM_0:1:12345678
In-Game Chat:
!cte_help
!cte_ban STEAM_0:1:12345678 60 Spamming
!cte_kick STEAM_0:1:87654321
Client Console:
cte_help
cte_ban STEAM_0:1:12345678 60 "Toxic behavior"
The plugin uses a role-based permission system:
| Role | Value | Description |
|---|---|---|
Player |
0 | Default role, can use basic commands |
Admin |
1 | Can use moderation commands (ban, kick, gag) |
Admin permissions are stored in the SQLite database (player_info table, Admin column).
The plugin uses SQLite with the following tables:
Stores player profiles and moderation status.
SteamID TEXT PRIMARY KEY
NickName TEXT
IP TEXT
Banned TEXT (ISO 8601 datetime)
Gagged TEXT (ISO 8601 datetime)
Talked INTEGER (message count)
Admin INTEGER (permission level)
Flags TEXT (comma-separated)Records all chat messages.
SteamID TEXT
Time TEXT (ISO 8601 datetime)
Type INTEGER (0=all, 1=team)
Content TEXTTracks moderation actions.
SteamID TEXT
Operator TEXT (admin SteamID)
Time TEXT (ISO 8601 datetime)
Until TEXT (ISO 8601 datetime)Logs profanity detections.
SteamID TEXT
Time TEXT (ISO 8601 datetime)
Type INTEGER (0=chat, 1=name)
Content TEXT (original message)
Detected TEXT (matched words)- Ensure
e_sqlite3.dll(or.so/.dylib) is inaddons/chatengine/dlls/ - Check server console for error messages
- Confirm
censor_words.dicexists and contains words (one per line) - Check
censorWordsFilePathin config.json - Review
ignoreCharacters- too many may cause false negatives
- Verify
commandPrefixmatches your usage - Check
chatTriggerarray for in-game chat commands
- Ensure
sqlStoragePathdirectory exists and is writable - Check file permissions on the
.dbfile - Verify SQLite library is loaded correctly
- .NET 10 SDK
- NuggetMod framework
# !!! USE AOT PUBLISH !!!
dotnet publish -c Release -r win-x86 -o ./build -p:PublishAot=true- Built with NuggetMod framework
- Uses SQLitePCL for database operations
Note: This plugin is designed for Half-Life/GoldSrc servers. Ensure compatibility with your specific game mod and server configuration.