]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
Fix an exploit and always prefix the name color with white
authorMario <mario@smbclan.net>
Fri, 26 Oct 2018 22:25:55 +0000 (08:25 +1000)
committerMario <mario@smbclan.net>
Fri, 26 Oct 2018 22:25:55 +0000 (08:25 +1000)
qcsrc/server/client.qc

index 6051e34054ad9bfd69d793c6259eed60bb874221..5481b67e552ce9aa8fc3bf0dc196b69d9c7079b0 100644 (file)
@@ -2745,12 +2745,14 @@ int Say(entity source, int teamsay, entity privatesay, string msgin, bool floodc
                if(strstrofs(msgin, "/me", 0) >= 0)
                {
                        string newmsgin = "";
-                       string newnamestr = ((teamsay) ? strcat(colorstr, "(", colorprefix, namestr, colorstr, ")^7") : strcat(colorprefix, namestr));
-                       found_me = true;
+                       string newnamestr = ((teamsay) ? strcat("^7", colorstr, "(", colorprefix, namestr, colorstr, ")^7") : strcat("^7", colorprefix, namestr));
                        FOREACH_WORD(msgin, true,
                        {
                                if(strdecolorize(it) == "/me")
+                               {
+                                       found_me = true;
                                        newmsgin = cons(newmsgin, newnamestr);
+                               }
                                else
                                        newmsgin = cons(newmsgin, it);
                        });