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 => {
23 :netmask => "255.255.255.255",
24 :k => "no_account_creation",
25 :v => "auto_spam_block"
28 puts "Blocked #{address}"
33 acls = Acl.find(:all, :conditions => {
34 :k => "no_account_creation",
35 :v => "auto_spam_block"
39 unless addresses[acl.address]
42 puts "Unblocked #{acl.address}"