From b0dbbfd725eddb6e3a585144f8a772e4ae61dc31 Mon Sep 17 00:00:00 2001 From: "M. Kristall" Date: Mon, 21 Feb 2011 22:17:46 +0000 Subject: * Properly censor private messages --- src/game/g_cmds.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/game') 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 ) ); -- cgit