3 require File.dirname(__FILE__) + '/../config/environment'
6 addresses = User.count(
8 :status => ["suspended", "deleted"],
9 :creation_time => Time.now - 28.days .. Time.now
11 :group => :creation_ip
14 addresses.each do |address,count|
16 acl = Acl.find(:first, :conditions => {
18 :netmask => "255.255.255.255"
24 :netmask => "255.255.255.255",
26 :v => "auto_spam_block"
29 puts "Blocked #{address}"
34 acls = Acl.find(:all, :conditions => {
35 :netmask => "255.255.255.255",
36 :k => "no_account_creation",
37 :v => "auto_spam_block"
41 unless addresses[acl.address]
44 puts "Unblocked #{acl.address}"