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: