From 626a530523e613e5a082570e14fd5d72f2554125 Mon Sep 17 00:00:00 2001 From: div0 Date: Sun, 3 May 2009 19:50:42 +0000 Subject: [PATCH] fix a bug in flood control git-svn-id: svn://svn.icculus.org/nexuiz/trunk@6644 f962a42d-fe04-0410-a3ab-8c8b0445ebaa --- data/qcsrc/server/cl_player.qc | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/data/qcsrc/server/cl_player.qc b/data/qcsrc/server/cl_player.qc index 653064470..0207f9056 100644 --- a/data/qcsrc/server/cl_player.qc +++ b/data/qcsrc/server/cl_player.qc @@ -783,10 +783,15 @@ void Say(entity source, float teamsay, entity privatesay, string msgin, float fl msgstr = substring(msgstr, 1, strlen(msgstr) - 1); if(getWrappedLine_remaining != "") + { + msgstr = strcat(msgstr, "\n"); flood = 2; + } if(time >= source.flood_field) + { source.flood_field = max(time - flood_burst * flood_spl, source.flood_field) + lines * flood_spl; + } else { flood = 1; @@ -826,7 +831,7 @@ void Say(entity source, float teamsay, entity privatesay, string msgin, float fl // build sourcemsgstr by cutting off a prefix and replacing it by the other one if(privatesay) - sourcemsgstr = strcat(privatemsgprefix, substring(msgstr, privatemsgprefixlen, -1)); + sourcemsgstr = strcat(privatemsgprefix, substring(sourcemsgstr, privatemsgprefixlen, -1)); if(flood == 1) { -- 2.39.2