# HG changeset patch # User Adam Kaminski # Date 1629460793 14400 # Fri Aug 20 07:59:53 2021 -0400 # Node ID b71a5f791602644e7523354b65739328dea014f0 # Parent f92c10f0e02c7e75d48bf447c2015f1842d388b8 Private messages that aren't sent to/from the server are now logged. diff -r f92c10f0e02c -r b71a5f791602 src/sv_main.cpp --- a/src/sv_main.cpp Fri Aug 20 00:17:18 2021 -0400 +++ b/src/sv_main.cpp Fri Aug 20 07:59:53 2021 -0400 @@ -1162,10 +1162,6 @@ GAMEMODE_HandleEvent( GAMEEVENT_CHAT, 0, ulPlayer != MAXPLAYERS ? ulPlayer : -1, ulMode - CHATMODE_GLOBAL ); } - // [AK] Don't log private messages that aren't sent to/from the server. - if (( ulMode == CHATMODE_PRIVATE_SEND ) && ( ulPlayer != MAXPLAYERS ) && ( ulReceiver != MAXPLAYERS )) - return; - // [BB] This is to make the lines readily identifiable, necessary // for MiX-MaN's IRC server control tool for example. if( sv_markchatlines ) @@ -1176,6 +1172,8 @@ pszString += 3; if ( ulMode == CHATMODE_PRIVATE_SEND ) { + if (( ulPlayer != MAXPLAYERS ) && ( ulReceiver != MAXPLAYERS )) + Printf( "<%s to %s> ", players[ulPlayer].userinfo.GetName(), players[ulReceiver].userinfo.GetName() ); if ( ulPlayer == MAXPLAYERS ) Printf( " ", players[ulReceiver].userinfo.GetName() ); else @@ -1188,10 +1186,14 @@ { if ( ulMode == CHATMODE_PRIVATE_SEND ) { - if ( ulPlayer == MAXPLAYERS ) - Printf( ": %s\n", players[ulReceiver].userinfo.GetName(), pszString ); + if (( ulPlayer != MAXPLAYERS ) && ( ulReceiver != MAXPLAYERS )) + Printf( "<%s to %s>", players[ulPlayer].userinfo.GetName(), players[ulReceiver].userinfo.GetName() ); + else if ( ulPlayer == MAXPLAYERS ) + Printf( "", players[ulReceiver].userinfo.GetName() ); else - Printf( ": %s\n", players[ulPlayer].userinfo.GetName(), pszString ); + Printf( "", players[ulPlayer].userinfo.GetName() ); + + Printf( ": %s\n", pszString ); } else {