X-Git-Url: https://git.openstreetmap.org./nominatim.git/blobdiff_plain/14097fe1df35930481aea443a30a71cf3de3f922..c371bbcfe45904ab56ece73f709b75e5ef6502fd:/utils/cron_banip.py?ds=inline diff --git a/utils/cron_banip.py b/utils/cron_banip.py index 17268bc1..c8fdd78c 100755 --- a/utils/cron_banip.py +++ b/utils/cron_banip.py @@ -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: