[nexuiz-commits] r6644 - trunk/data/qcsrc/server

DONOTREPLY at icculus.org DONOTREPLY at icculus.org
Sun May 3 15:50:43 EDT 2009


Author: div0
Date: 2009-05-03 15:50:42 -0400 (Sun, 03 May 2009)
New Revision: 6644

Modified:
   trunk/data/qcsrc/server/cl_player.qc
Log:
fix a bug in flood control


Modified: trunk/data/qcsrc/server/cl_player.qc
===================================================================
--- trunk/data/qcsrc/server/cl_player.qc	2009-05-03 19:28:02 UTC (rev 6643)
+++ trunk/data/qcsrc/server/cl_player.qc	2009-05-03 19:50:42 UTC (rev 6644)
@@ -783,10 +783,15 @@
 		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 @@
 	
 	// 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)
 	{



More information about the nexuiz-commits mailing list