diff options
author | M. Kristall <mkpdev@gmail.com> | 2011-02-21 22:17:46 +0000 |
---|---|---|
committer | Tim Angus <tim@ngus.net> | 2013-01-03 00:18:02 +0000 |
commit | b0dbbfd725eddb6e3a585144f8a772e4ae61dc31 (patch) | |
tree | de2fb8ea4e769ef3cc1fd569eeeb1e46b5e204dd /src/game/g_cmds.c | |
parent | 2200a515b61e26e72a3f2a798f2c2ec9df4b21ff (diff) |
* Properly censor private messages
Diffstat (limited to 'src/game/g_cmds.c')
-rw-r--r-- | src/game/g_cmds.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/game/g_cmds.c b/src/game/g_cmds.c index 4f5e986e..1396b583 100644 --- a/src/game/g_cmds.c +++ b/src/game/g_cmds.c @@ -3329,10 +3329,12 @@ void Cmd_PrivateMessage_f( gentity_t *ent ) msg = ConcatArgs( 2 ); pcount = G_ClientNumbersFromString( name, pids, MAX_CLIENTS ); + G_CensorString( text, msg, sizeof( text ), ent ); + // send the message for( i = 0; i < pcount; i++ ) if( G_SayTo( ent, &g_entities[ pids[ i ] ], - teamonly ? SAY_TPRIVMSG : SAY_PRIVMSG, msg ) ) + teamonly ? SAY_TPRIVMSG : SAY_PRIVMSG, text ) ) count++; // report the results @@ -3341,8 +3343,6 @@ void Cmd_PrivateMessage_f( gentity_t *ent ) Com_sprintf( str, sizeof( str ), "^%csent to %i player%s", color, count, ( count == 1 ) ? "" : "s" ); - G_CensorString( text, msg, sizeof( text ), ent ); - if( !count ) ADMP( va( "^3No player matching ^7\'%s^7\' ^3to send message to.\n", name ) ); |