]> git.openstreetmap.org Git - nominatim.git/commitdiff
don't bulk ua banned ips
authorSarah Hoffmann <lonvia@denofr.de>
Fri, 30 Aug 2013 23:14:35 +0000 (01:14 +0200)
committerSarah Hoffmann <lonvia@denofr.de>
Fri, 30 Aug 2013 23:14:35 +0000 (01:14 +0200)
utils/cron_banip.py

index 17268bc15a48f0d49b90108442a6d9eca9c0b9ea..c8fdd78c9aea124a305559e6b748ed121c0b96d2 100755 (executable)
@@ -168,15 +168,16 @@ for ip in prevblocks:
         deblockcandidates.add(ip)    
         
 for ip in prevbulks:
-    if ip in bulkips:
-        if bulkips[ip] > BLOCK_LIMIT:
-            newblocks.add(ip)
-            newlyblocked.append(ip)
+    if ip not in newblocks:
+        if ip in bulkips:
+            if bulkips[ip] > BLOCK_LIMIT:
+                newblocks.add(ip)
+                newlyblocked.append(ip)
+            else:
+                newbulks.add(ip)
+            del bulkips[ip]
         else:
-            newbulks.add(ip)
-        del bulkips[ip]
-    else:
-        debulkcandidates.add(ip)
+            debulkcandidates.add(ip)
 
 # cross-check deblock candidates
 if deblockcandidates: