3 require File.dirname(__FILE__) + '/../config/environment'
6 addresses = User.count(
8 :status => %w(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 => {
23 :k => "no_account_creation",
24 :v => "auto_spam_block"
25 }, { :without_protection => true })
27 puts "Blocked #{address}"
32 acls = Acl.find(:all, :conditions => {
33 :k => "no_account_creation",
34 :v => "auto_spam_block"
38 unless addresses[acl.address]
41 puts "Unblocked #{acl.address}"