From 3c7e7cc1c3cb21e7dc5f992a85f658420b8101b4 Mon Sep 17 00:00:00 2001 From: Mario Date: Sat, 27 Oct 2018 08:25:55 +1000 Subject: [PATCH] Fix an exploit and always prefix the name color with white --- qcsrc/server/client.qc | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) 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); }); -- 2.39.2