From c30d1b0c4fdd96979b616b67eda9d96aae37209a Mon Sep 17 00:00:00 2001 From: Christopher Schwarz Date: Tue, 8 Dec 2009 00:06:28 +0000 Subject: * Add a EndVote: line to games.log for showing vote results (Rezyn) * Add additional coloured versions of client names to games.log in ClientConnect and ClientRename lines for use by Tremstats et. al. (Rezyn) --- src/game/g_cmds.c | 26 +++++++++++++++++++++++++- 1 file changed, 25 insertions(+), 1 deletion(-) (limited to 'src/game/g_cmds.c') diff --git a/src/game/g_cmds.c b/src/game/g_cmds.c index 1816b8f5..d2bf150e 100644 --- a/src/game/g_cmds.c +++ b/src/game/g_cmds.c @@ -3151,10 +3151,18 @@ void G_ListCommands( gentity_t *ent ) void G_DecolorString( char *in, char *out, int len ) { + qboolean decolor = qtrue; + len--; while( *in && len > 0 ) { - if( Q_IsColorString( in ) ) { + if( *in == DECOLOR_OFF || *in == DECOLOR_ON ) + { + decolor = ( *in == DECOLOR_ON ); + in++; + continue; + } + if( Q_IsColorString( in ) && decolor ) { in += 2; continue; } @@ -3164,6 +3172,22 @@ void G_DecolorString( char *in, char *out, int len ) *out = '\0'; } +void G_UnEscapeString( char *in, char *out, int len ) +{ + len--; + + while( *in && len > 0 ) + { + if( *in >= ' ' || *in == '\n' ) + { + *out++ = *in; + len--; + } + in++; + } + *out = '\0'; +} + void Cmd_PrivateMessage_f( gentity_t *ent ) { int pids[ MAX_CLIENTS ]; -- cgit