summaryrefslogtreecommitdiff
path: root/src/game/g_cmds.c
diff options
context:
space:
mode:
authorChristopher Schwarz <lakitu7@gmail.com>2009-12-08 00:06:28 +0000
committerTim Angus <tim@ngus.net>2013-01-03 00:17:23 +0000
commitc30d1b0c4fdd96979b616b67eda9d96aae37209a (patch)
tree87b5d460ae8b097ba4c7f41f403ede6baee8be0a /src/game/g_cmds.c
parent9040fbd03fee6f5d098abd49518a0a85ea9f65a2 (diff)
* 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)
Diffstat (limited to 'src/game/g_cmds.c')
-rw-r--r--src/game/g_cmds.c26
1 files changed, 25 insertions, 1 deletions
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 ];