Mitigate Counter-Strike 2 chat flooding from players.
An advanced high-performance plugin with built-in concurrency support to mitigate Counter-Strike 2 chat flooding. Root has immunity by default. Make sure you alter the code in case you need specific changes.
- .NET built-in ConcurrentDictionary
- Internal logic based on Unix Timestamps
- Prioritization of
constdata types usage - Calls for
Clear(),ReduceMemory()andAddUserIDValues()duringOnMapStartevent in caseEventPlayerDisconnectis not triggered on map change and some of the players will not connect back to the server, leaving the data stored in dictionaries - No high overhead data types, no overflow or underflow and no useless memory allocs
- Making 1 Dictionary lookup before alloc instead of multiple lookups
- Big O time complexity of
O(1)on average orO(n)in the worst case
- Go to software releases section. Pick the latest.
- Download
CSSharpChatAntiflood.zip. - Extract the archive.
- Make sure you have the needed files (
.dll,.pdb,.deps.json) in the folderCSSharpChatAntiflood. - Upload that directory in
/game/csgo/addons/counterstrikesharp/plugins.
- Get an IDE & Code Editor (Visual Studio, Rider or others).
- Edit and debug if you need to.
- Build the code.
- Add the files (
.dll,.pdb,.deps.json) in their own directory. - Rename directory. Use the same name.
- Upload it with containing files in
/game/csgo/addons/counterstrikesharp/plugins.
If you want to change general settings of the plugin:
const byte MaxMessages = 3;- Max messages before blockingconst long MinSecondsBetweenMessages = 5;- Min messages between messages to avoid PlayersTimestamp changesconst string ChatAntifloodTAG = "Modders";- Chat TAG for message
Caution
- Make sure you set
MaxMessagesvalue >=3. - In case of refusal you may need to do a code refactoring.
Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.
Give a ⭐ if this project helped you.
MIT based on outlined exemption from CounterStrikeSharp.