From: Mario Date: Sun, 30 Aug 2015 06:12:51 +0000 (+1000) Subject: * Mario adds /me X-Git-Tag: xonotic-v0.8.2~1978 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=6c9933e282527ccc4a1d2e433149a71c42af9114;p=xonotic%2Fxonotic-data.pk3dir.git * Mario adds /me --- diff --git a/qcsrc/server/cl_player.qc b/qcsrc/server/cl_player.qc index 8ed9619d5..9add7e808 100644 --- a/qcsrc/server/cl_player.qc +++ b/qcsrc/server/cl_player.qc @@ -707,12 +707,28 @@ float Say(entity source, float teamsay, entity privatesay, string msgin, float f } else if(teamsay) { - msgstr = strcat("\{1}\{13}", colorstr, "(", colorprefix, namestr, colorstr, ") ^7", msgin); + if(strstrofs(msgin, "/me", 0) >= 0) + { + //msgin = strreplace("/me", "", msgin); + //msgin = substring(msgin, 3, strlen(msgin)); + msgin = strreplace("/me", strcat(colorstr, "(", colorprefix, namestr, colorstr, ")^7"), msgin); + msgstr = strcat("\{1}\{13}^4* ", "^7", msgin); + } + else + msgstr = strcat("\{1}\{13}", colorstr, "(", colorprefix, namestr, colorstr, ") ^7", msgin); cmsgstr = strcat(colorstr, "(", colorprefix, namestr, colorstr, ")\n^7", msgin); } else { - msgstr = strcat("\{1}", colorprefix, namestr, "^7: ", msgin); + if(strstrofs(msgin, "/me", 0) >= 0) + { + //msgin = strreplace("/me", "", msgin); + //msgin = substring(msgin, 3, strlen(msgin)); + msgin = strreplace("/me", strcat(colorprefix, namestr), msgin); + msgstr = strcat("\{1}^4* ", "^7", msgin); + } + else + msgstr = strcat("\{1}", colorprefix, namestr, "^7: ", msgin); cmsgstr = ""; } msgstr = strcat(strreplace("\n", " ", msgstr), "\n"); // newlines only are good for centerprint