Found it! IsChatTrigger()...
Ok here is my version of your plugin. I've renamed the plugin and version etc and given you credit. I've added a bunch of console commands to configure\help the player
Console commands
Code:
RegConsoleCmd("sm_coloredname_on", Command_SetColoredNameOn, "Turns on the colored name for the player");
RegConsoleCmd("sm_coloredname_off", Command_SetColoredNameOff, "Turns off the colored name for the player");
RegConsoleCmd("sm_coloredname", Command_SetColoredName, "Sets the current players colored name");
RegConsoleCmd("sm_coloredname_help", Command_PrintHelp, "Lists helpful information to the client");
RegConsoleCmd("sm_coloredname_list", Command_ListUsers, "Lists all users with their real and colored names", ADMFLAG_KICK);
This version also correctly identifies *DEAD* players in the chat string, and it also logs the chat action to the server logs just like it would normally. I adjusted the chat (and team chat) output to match the normal non-plugin chat output exactly.
Only known issue is that Command_PrintHelp sometimes prints things out of order, i don't know why. PrintToConsole is the culprit.
*UPDATE* Found error where alive players could hear the dead players which is fixed. I also added a check on the text being said by the player, if it starts with an @ symbol it is not processed and sent through the normal chat system. Reason being that the say @ and say_team @ are ways for admins to talk to each other and this plugin was repeating them.
Current Version 1.1