]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blobdiff - qcsrc/server/ipban.qc
Make that easier to read
[xonotic/xonotic-data.pk3dir.git] / qcsrc / server / ipban.qc
index f770dc513e7195de40324cc58f3d27df021f4894..08fd83fe3fab99c12c6a448e5f6198328281523c 100644 (file)
@@ -324,6 +324,7 @@ void Ban_View()
        
        print("^2Listing all existing active bans:\n");
        
+       n = 0;
        for(i = 0; i < ban_count; ++i)
        {
                if(time > ban_expire[i])
@@ -430,8 +431,12 @@ float Ban_IsClientBanned(entity client, float idx)
                if(ban_idfp == s) return TRUE;
        }
        if(ipbanned)
-               if(!autocvar_g_banned_list_idmode || !ban_idfp)
+       {
+               if(!autocvar_g_banned_list_idmode)
+                       return TRUE;
+               if not(ban_idfp)
                        return TRUE;
+       }
        return FALSE;
 }
 
@@ -475,7 +480,7 @@ string Ban_Enforce(float i, string reason)
                                        reason = strcat(reason, ", ");
                                reason = strcat(reason, e.netname);
                        }
-                       s = strcat(s, "^1NOTE:^7 banned client ", e.netname, "^7 has to go\n");
+                       s = strcat(s, "^1NOTE:^7 banned client ", e.netaddress, "^7 has to go\n");
                        dropclient(e);
                }
        bprint(s);