]> git.openstreetmap.org Git - rails.git/blobdiff - script/update-spam-blocks
Wrap the ID in <bdi> tags for RTL locales
[rails.git] / script / update-spam-blocks
index 903fc9b8a35a61d0b07f72779434eeea61597521..c21b17cff0ca0293bd3962fabc1f78a2714f6919 100755 (executable)
@@ -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_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"
 })