Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- diff -r 00065f166c52 src/sv_main.cpp
- --- a/src/sv_main.cpp Sun Aug 19 22:11:18 2012 +0200
- +++ b/src/sv_main.cpp Sun Jul 07 12:30:32 2013 -0400
- @@ -1072,28 +1072,36 @@
- // [BB] This is to make the lines readily identifiable, necessary
- // for MiX-MaN's IRC server control tool for example.
- bool sv_logfiletimestampOldValue = sv_logfiletimestamp;
- - if( sv_markchatlines )
- - {
- - Printf( "CHAT " );
- - sv_logfiletimestamp = false;
- - }
- + char outString[512];
- + char tmpString[256];
- +
- + memset(outString, 0, 512 * sizeof(char));
- + memset(tmpString, 0, 256 * sizeof(char));
- +
- + snprintf(outString, 512, "CHAT %% ");
- + sv_logfiletimestamp = false;
- +
- // Print this message in the server's local window.
- if ( strnicmp( "/me", pszString, 3 ) == 0 )
- {
- pszString += 3;
- if ( ulPlayer == MAXPLAYERS )
- - Printf( "* <server>%s\n", pszString );
- + snprintf(tmpString, 256, "* <server> %%%s\n", pszString);
- else
- - Printf( "* %s%s\n", players[ulPlayer].userinfo.netname, pszString );
- + snprintf(tmpString, 256, "* %s %%%s\n", players[ulPlayer].userinfo.netname, pszString);
- }
- else
- {
- if ( ulPlayer == MAXPLAYERS )
- - Printf( "<server>: %s\n", pszString );
- + snprintf(tmpString, 256, "<server> %% %s\n", pszString );
- else
- - Printf( "%s: %s\n", players[ulPlayer].userinfo.netname, pszString );
- - }
- - if( sv_markchatlines && sv_logfiletimestampOldValue )
- + snprintf(tmpString, 256, "%s %% %s\n", players[ulPlayer].userinfo.netname, pszString );
- + }
- +
- + strcat(outString, tmpString);
- + Printf("%s", outString); // ugly hack to circumvent Printf processing
- +
- + if( sv_logfiletimestampOldValue )
- sv_logfiletimestamp = true;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement