diff options
-rw-r--r-- | src/game/g_cmds.c | 12 | ||||
-rw-r--r-- | src/game/g_local.h | 1 | ||||
-rw-r--r-- | src/game/g_main.c | 2 |
3 files changed, 11 insertions, 4 deletions
diff --git a/src/game/g_cmds.c b/src/game/g_cmds.c index f93b2f8..dad9cfe 100644 --- a/src/game/g_cmds.c +++ b/src/game/g_cmds.c @@ -5799,10 +5799,14 @@ void G_PrivateMessage( gentity_t *ent ) ADMP( va( "%s\n", str ) ); - G_LogPrintf( "%s: %s^7: %s^7: %s\n", - ( teamonly ) ? "tprivmsg" : "privmsg", - ( ent ) ? ent->client->pers.netname : "console", - name, msg ); + if( g_logPrivateMessages.integer >= 1 ) + { + G_LogPrintf( "%s: %s^7: %s^7%s%s\n", + ( teamonly ) ? "tprivmsg" : "privmsg", + ( ent ) ? ent->client->pers.netname : "console", + name, g_logPrivateMessages.integer >= 2 ? ": " : "", + g_logPrivateMessages.integer >= 2 ? msg : "" ); + } } if( ignored ) diff --git a/src/game/g_local.h b/src/game/g_local.h index bd337da..d51cf1b 100644 --- a/src/game/g_local.h +++ b/src/game/g_local.h @@ -1475,6 +1475,7 @@ extern vmCvar_t g_killerHP; extern vmCvar_t g_maxGhosts; extern vmCvar_t g_privateMessages; +extern vmCvar_t g_logPrivateMessages; extern vmCvar_t g_decolourLogfiles; extern vmCvar_t g_publicSayadmins; extern vmCvar_t g_myStats; diff --git a/src/game/g_main.c b/src/game/g_main.c index 814224d..105a95e 100644 --- a/src/game/g_main.c +++ b/src/game/g_main.c @@ -200,6 +200,7 @@ vmCvar_t g_minLevelToJoinTeam; vmCvar_t g_forceAutoSelect; vmCvar_t g_privateMessages; +vmCvar_t g_logPrivateMessages; vmCvar_t g_decolourLogfiles; vmCvar_t g_minLevelToSpecMM1; vmCvar_t g_publicSayadmins; @@ -470,6 +471,7 @@ static cvarTable_t gameCvarTable[ ] = { &g_maxGhosts, "g_maxGhosts", "0", CVAR_ARCHIVE, 0, qfalse }, { &g_privateMessages, "g_privateMessages", "1", CVAR_ARCHIVE, 0, qfalse }, + { &g_logPrivateMessages, "g_logPrivateMessages", "1", CVAR_ARCHIVE, 0, qfalse }, { &g_decolourLogfiles, "g_decolourLogfiles", "0", CVAR_ARCHIVE, 0, qfalse }, { &g_buildLogMaxLength, "g_buildLogMaxLength", "50", CVAR_ARCHIVE, 0, qfalse }, { &g_myStats, "g_myStats", "1", CVAR_ARCHIVE, 0, qtrue }, |