X-Git-Url: https://git.openstreetmap.org./rails.git/blobdiff_plain/dd64ba2e7ef93f1e2e10ee5fb63251b1dab7132f..b76bfe379e6527c9cfc2ced97aa615f8c2c45dd7:/script/update-spam-blocks diff --git a/script/update-spam-blocks b/script/update-spam-blocks index eaf7d9dc3..c21b17cff 100755 --- a/script/update-spam-blocks +++ b/script/update-spam-blocks @@ -12,19 +12,17 @@ addresses = User.count( ) addresses.each do |address,count| - if count > 2 + if count > 1 acl = Acl.find(:first, :conditions => { :address => address, - :netmask => "255.255.255.255" }) unless acl - Acl.create( + Acl.create({ :address => address, - :netmask => "255.255.255.255", - :k => "no_account", + :k => "no_account_creation", :v => "auto_spam_block" - ) + }, :without_protection => true) puts "Blocked #{address}" end @@ -32,7 +30,6 @@ addresses.each do |address,count| end acls = Acl.find(:all, :conditions => { - :netmask => "255.255.255.255", :k => "no_account_creation", :v => "auto_spam_block" })