Here's a tip for when you're doing stuff with the chat:
Instead of using
messageClient(client, callback, string);
Use
commandtoclient(client, 'chatmessage', sender*, 0*, 0*, string, sender.clanPrefix, sender.getPlayerName(), sender.clanSuffix, message, 0*);
*: Not 100% sure about these bunch but nothing seems to break just using 0s there.
To perfectly replicate how the default chat appears (visually, the *'d arguments may differ) you would use:
function servercmdmessagesent(%client,%message)
{
commandtoall('chatmessage', %client, 0, 0, "\c7" @ %client.clanPrefix @ "\c3" @ %client.getPlayerName() @ "\c7" @ %client.clanSuffix @ "\c6:" SPC %message, %client.clanPrefix, %client.getPlayerName(), %client.clanSuffix, %message, 0);
}
This way, people with clientside mods that do things with chat (mine is a bot, which I admit is somewhat frowned upon but mine does a bunch of useful stuff as well as standard buggering, plus some little modifications to chat display, but another example is Trader's filter chat by BL_ID mod that was released at some point) won't be broken by your modification of the chat.
THE MOAR YOU KNOW. :D