Cider Chat Processor
Just another SayText2 hook and forward plugin. The reason this exists is primarily because I've had so many issues with the other chat processors available. I needed something that could also change the recipients before any other plugin added chat colors etc, and manage dead chat properly. Also needed it to disable say_team theoretically, so the other team can see it (without the prefix of (TEAM)).
This plugin contains a few bug fixes that other processors do not contain that should prevent any exploits of players adding colors to their chat without help from a server plugin.
This is pretty much a simpler version of
r3dw3r3w0lf's Chat Processor plugin, I've been sitting on this for a few years now and figured since I finished my own chat plugin I'll need to release this also.
This plugin is just a forwarder and will strip all unicode characters < 17 (except the terminator) from the name and message. This also doesn't use random crap includes like color variables, why the hell would a SayText2 forwarder need to assign colors anyways, that's the job for the plugin that it's forwarding to... /rant
Keep in mind this was created with TF2 testing, I only did minimal testing on csgo and haven't tried some of the changes I've pushed recently.
Also Special thanks to
Drixevel and his processor, if the changes I needed weren't so different this would have just been a pull request to his processor.
Why 'Cider'
When creating this I was drinking some cider. Yee yee
Server Operator ConVar Config
Code:
//Enable Cider Chat Processor
sm_ccp_enable "1"
//Name of the message formats config, incase you have some where else you want to put this?
sm_ccp_config "configs/chat_processor.cfg"
//Dead chat is seen by alive players.
// (WARNING) a module plugin can use CCP_OnChatMessagePre or CCP_OnChatMessage to change the array of recipients.
sm_ccp_deadchat "1"
//Team chat isn't seen by other team
// 0 - Disabled, say_team isn't converted to All Chat.
// 1 - No Filter, all team's say_team is converted to All Chat.
// 2 - Team 2's chat is converted to All Chat.
// 3 - Team 3's chat is converted to All Chat.
sm_ccp_teamchat "0"
Developer Forwards
Code:
/**
* Called before CCP_OnChatMessage, useful to check the author and stop the message or change whose in the recipients ArrayList.
* flagstring can also be changed to make the message appear from an alive person etc.
* recipients contains userIds, by default it is filled matching the processors config file.
**/
forward Action CCP_OnChatMessagePre(int& author, ArrayList recipients, char[] flagstring);
/**
* Called while sending a chat message before It's sent to all recipients.
* This is where a chat manager plugin can change the name and message to add colors etc.
* Changing author to -1 will make {03} purple instead of team color (On CS:GO engine).
**/
forward Action CCP_OnChatMessage(int& author, ArrayList recipients, char[] flagstring, char[] name, char[] message);
/**
* Called after the chat message is sent to the designated clients by the author.
**/
forward void CCP_OnChatMessagePost(int author, ArrayList recipients, const char[] flagstring, const char[] formatstring, const char[] name, const char[] message);
Releases (Plugin)
GitHub (Source)