From: TimePath Date: Thu, 31 Mar 2016 07:47:39 +0000 (+1100) Subject: Fix IRC bot double chat X-Git-Tag: xonotic-v0.8.2~979 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=c8220e50f3b82d417ac57a33c7a3bd1c8de73524;p=xonotic%2Fxonotic-data.pk3dir.git Fix IRC bot double chat --- 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)); } }