# HG changeset patch # User Adam Kaminski # Date 1615218886 18000 # Mon Mar 08 10:54:46 2021 -0500 # Node ID 6d07f07577ff904e2f351b02a0770c1e31504215 # Parent f50f8fdcc7fb3b47647b2bb8034af9022f1db35e Private messages aren't sent now if the sender is supposed to be ignoring the receiver. Likewise, the message won't be sent to the receiver if they're supposed to be ignoring the sender, but will instead be sent back only to the sender so they can't know if they've been ignored. diff -r f50f8fdcc7fb -r 6d07f07577ff src/sv_commands.cpp --- a/src/sv_commands.cpp Sun Mar 07 15:33:16 2021 -0500 +++ b/src/sv_commands.cpp Mon Mar 08 10:54:46 2021 -0500 @@ -1091,9 +1091,22 @@ return; } - command.SetPlayerNumber( ulSender ); - command.SetMode( CHATMODE_PRIVATE_RECEIVE ); - command.sendCommandToClients( ulReceiver, SVCF_ONLYTHISCLIENT ); + // [AK] Don't send the command if the sender is supposed to be ignoring the player who receives the message. + if ( SERVER_GetPlayerIgnoreTic( ulSender, SERVER_GetClient( ulReceiver )->Address ) != 0 ) + { + SERVER_PrintfPlayer( ulSender, "You have ignored %s on your end, so you can't send any private messages to them.\n", + players[ulReceiver].userinfo.GetName() ); + return; + } + + // [AK] Don't send the command to the receiver if they're supposed to be ignoring the player who sent the + // message. We'll still send the command back to the sender so they can't know if they've been ignored. + if (( ulSender == MAXPLAYERS ) || ( SERVER_GetPlayerIgnoreTic( ulReceiver, SERVER_GetClient( ulSender )->Address ) == 0 )) + { + command.SetPlayerNumber( ulSender ); + command.SetMode( CHATMODE_PRIVATE_RECEIVE ); + command.sendCommandToClients( ulReceiver, SVCF_ONLYTHISCLIENT ); + } } // [AK] Next, send the command back to the player who sent the message.