From: Mattia Basaglia Date: Sat, 17 Jan 2015 10:02:16 +0000 (+0100) Subject: Consider unconnected players in Ban_Enforce X-Git-Tag: xonotic-v0.8.1~139^2~3 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=c212772cb82fee0c927dc45532625622e64df026;p=xonotic%2Fxonotic-data.pk3dir.git Consider unconnected players in Ban_Enforce --- diff --git a/qcsrc/server/ipban.qc b/qcsrc/server/ipban.qc index 9f044b958..b7ea0cc2f 100644 --- a/qcsrc/server/ipban.qc +++ b/qcsrc/server/ipban.qc @@ -469,7 +469,8 @@ string Ban_Enforce(float i, string reason) // Enforce our new ban s = ""; - FOR_EACH_REALCLIENT(e) + for(e = world; (e = nextent(e)) && (num_for_edict(e) <= maxclients); ) + if (IS_REAL_CLIENT(e)) if(Ban_IsClientBanned(e, i)) { if(reason != "") @@ -604,7 +605,6 @@ void Ban_KickBanClient(entity client, float bantime, float masksize, string reas * not needed, as we enforce the ban in Ban_Insert anyway // and kick him sprint(client, strcat("Kickbanned: ", reason, "\n")); + dropclient(client); */ - if (IS_REAL_CLIENT(client)) - dropclient(client); }