From c8220e50f3b82d417ac57a33c7a3bd1c8de73524 Mon Sep 17 00:00:00 2001 From: TimePath Date: Thu, 31 Mar 2016 18:47:39 +1100 Subject: [PATCH] Fix IRC bot double chat --- qcsrc/server/cl_player.qc | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/qcsrc/server/cl_player.qc b/qcsrc/server/cl_player.qc index a749ec2de..baa5e98df 100644 --- a/qcsrc/server/cl_player.qc +++ b/qcsrc/server/cl_player.qc @@ -933,15 +933,14 @@ int Say(entity source, int teamsay, entity privatesay, string msgin, bool floodc dedicated_print(msgstr); // send to server console too FOREACH_CLIENT(!IS_PLAYER(it) && IS_REAL_CLIENT(it) && it != source, sprint(it, msgstr)); } - else { - if (sourcemsgstr != msgstr) { // trimmed/server fixed message, sent to all players + else + { + if (source) { sprint(source, sourcemsgstr); dedicated_print(msgstr); // send to server console too - FOREACH_CLIENT(IS_REAL_CLIENT(it) && it != source, sprint(it, msgstr)); - } else { // entirely normal message, sent to all players -- bprint sends to server console too. - bprint(msgstr); + MX_Say(strcat(playername(source), "^7: ", msgin)); } - if (source) MX_Say(strcat(playername(source), "^7: ", msgin)); + FOREACH_CLIENT(IS_REAL_CLIENT(it) && it != source, sprint(it, msgstr)); } } -- 2.39.2