]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blobdiff - qcsrc/server/ipban.qc
Merge branch 'master' of ssh://gitlab.com/xonotic/xonotic-data.pk3dir into kickban...
[xonotic/xonotic-data.pk3dir.git] / qcsrc / server / ipban.qc
index a180547c0f97c09cb3632fdeb694e9bece0762a5..d8a70fe658a238fe1d4e414cfd3164d472ee7a9e 100644 (file)
@@ -138,7 +138,7 @@ void OnlineBanList_URI_Get_Callback(float id, float status, string data)
        else
                n = tokenizebyseparator(data, "\n");
 
-       if(mod(n, 4) != 0)
+       if((n % 4) != 0)
        {
                print("error: received invalid item count: ", ftos(n), "\n");
                return;
@@ -459,7 +459,7 @@ float Ban_MaybeEnforceBanOnce(entity client)
        if(client.ban_checked)
                return FALSE;
        client.ban_checked = TRUE;
-       return Ban_MaybeEnforceBan(self);
+       return Ban_MaybeEnforceBan(client);
 }
 
 string Ban_Enforce(float i, string reason)
@@ -469,7 +469,8 @@ string Ban_Enforce(float i, string reason)
 
        // Enforce our new ban
        s = "";
-       FOR_EACH_REALCLIENT(e)
+       FOR_EACH_CLIENTSLOT(e)
+               if (IS_REAL_CLIENT(e))
                if(Ban_IsClientBanned(e, i))
                {
                        if(reason != "")