r2777 - trunk/data/qcsrc/server

DONOTREPLY at icculus.org DONOTREPLY at icculus.org
Tue Jun 26 12:26:53 EDT 2007


Author: div0
Date: 2007-06-26 12:26:53 -0400 (Tue, 26 Jun 2007)
New Revision: 2777

Modified:
   trunk/data/qcsrc/server/ipban.qc
Log:
make ban list for no bans "" and not "1", less irritating (first number is the version number of the list format)


Modified: trunk/data/qcsrc/server/ipban.qc
===================================================================
--- trunk/data/qcsrc/server/ipban.qc	2007-06-26 16:23:48 UTC (rev 2776)
+++ trunk/data/qcsrc/server/ipban.qc	2007-06-26 16:26:53 UTC (rev 2777)
@@ -26,7 +26,10 @@
 		out = strcat(out, " ", ban_ip[i]);
 		out = strcat(out, " ", ftos(ban_expire[i] - time));
 	}
-	cvar_set("g_banned_list", out);
+	if(strlen(out) <= 1) // no real entries
+		cvar_set("g_banned_list", "");
+	else
+		cvar_set("g_banned_list", out);
 }
 
 float Ban_Delete(float i)




More information about the nexuiz-commits mailing list