]> git.rm.cloudns.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
Fix IRC bot double chat
authorTimePath <andrew.hardaker1995@gmail.com>
Thu, 31 Mar 2016 07:47:39 +0000 (18:47 +1100)
committerTimePath <andrew.hardaker1995@gmail.com>
Thu, 31 Mar 2016 07:47:56 +0000 (18:47 +1100)
qcsrc/server/cl_player.qc

index a749ec2def81b8b60c1faaf8b9bf55d4270fda0a..baa5e98df85d65218e40d275e28b84527009e5dd 100644 (file)
@@ -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));
         }
        }