From: Mario Date: Fri, 26 Oct 2018 22:25:55 +0000 (+1000) Subject: Fix an exploit and always prefix the name color with white X-Git-Tag: xonotic-v0.8.5~1661^2~4 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=3c7e7cc1c3cb21e7dc5f992a85f658420b8101b4;p=xonotic%2Fxonotic-data.pk3dir.git Fix an exploit and always prefix the name color with white --- diff --git a/qcsrc/server/client.qc b/qcsrc/server/client.qc index 6051e34054..5481b67e55 100644 --- a/qcsrc/server/client.qc +++ b/qcsrc/server/client.qc @@ -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); });