From 5f5e2ea30c44354412ae4d9d7ed506e6375d5d2f Mon Sep 17 00:00:00 2001 From: Samual Lenks Date: Thu, 4 Oct 2012 22:47:06 -0400 Subject: [PATCH] g_chat_tellprivacy -- also print "tell" messages to console if disabled --- defaultXonotic.cfg | 1 + qcsrc/server/autocvars.qh | 1 + qcsrc/server/cl_player.qc | 3 ++- 3 files changed, 4 insertions(+), 1 deletion(-) diff --git a/defaultXonotic.cfg b/defaultXonotic.cfg index 69ab2b1a1..0227c0ee1 100644 --- a/defaultXonotic.cfg +++ b/defaultXonotic.cfg @@ -813,6 +813,7 @@ set g_chat_flood_lmax_tell 2 "private chat: maximum number of lines per chat mes set g_chat_flood_burst_tell 2 "private chat: allow bursts of so many chat lines" set g_chat_flood_notify_flooder 1 "when 0, the flooder still can see his own message" set g_chat_teamcolors 0 "colorize nicknames in team color for chat" +set g_chat_tellprivacy 1 "when disabled, tell messages are also sent to the server console log... otherwise they're kept private between players." set g_nick_flood_timeout 120 "time after which nick flood protection resets (set to 0 to disable nick flood checking)" set g_nick_flood_penalty 0.5 "duration of the nick flood penalty" set g_nick_flood_penalty_yellow 3 "number of changes to allow before warning and movement blocking" diff --git a/qcsrc/server/autocvars.qh b/qcsrc/server/autocvars.qh index 86688d181..9d52dd799 100644 --- a/qcsrc/server/autocvars.qh +++ b/qcsrc/server/autocvars.qh @@ -761,6 +761,7 @@ float autocvar_g_chat_flood_spl_team; float autocvar_g_chat_flood_spl_tell; float autocvar_g_chat_nospectators; float autocvar_g_chat_teamcolors; +float autocvar_g_chat_tellprivacy; float autocvar_g_ctf_allow_vehicle_carry; float autocvar_g_ctf_allow_vehicle_touch; float autocvar_g_ctf_throw; diff --git a/qcsrc/server/cl_player.qc b/qcsrc/server/cl_player.qc index d582540c0..1d8bae636 100644 --- a/qcsrc/server/cl_player.qc +++ b/qcsrc/server/cl_player.qc @@ -1023,10 +1023,11 @@ float Say(entity source, float teamsay, entity privatesay, string msgin, float f if(sourcecmsgstr != "" && !privatesay) centerprint(source, sourcecmsgstr); } - else if(privatesay) // private message, between 2 people only, not sent to server console + else if(privatesay) // private message, between 2 people only { sprint(source, sourcemsgstr); sprint(privatesay, msgstr); + if not(autocvar_g_chat_tellprivacy) { dedicated_print(msgstr); } // send to server console too if "tellprivacy" is disabled if(cmsgstr != "") centerprint(privatesay, cmsgstr); } -- 2.39.2