--- httpbl/httpbl.module	2009-09-12 09:27:40.000000000 -0500
+++ httpbl.module	2012-11-29 18:53:56.356482758 -0600
@@ -50,7 +50,11 @@
     );
   }
   else {
-    _httpbl_check();
+    $httpbl_check = variable_get('httpbl_check', 0);
+    // Only check when 'for all users' or 'for all anonymous users' is set
+    if ($httpbl_check > 2 || ($httpbl_check == 2 && !$user)) {
+      _httpbl_check();
+    }
   }
   return $items;
 }
@@ -65,6 +69,10 @@
   }
 
   switch ($op) {
+  case 'validate':
+    if (variable_get('httpbl_rejectcomments', 0)) {
+      _httpbl_check();
+    }
   case 'insert':
   case 'update':
     $comment = (object)$comment;
@@ -126,6 +134,13 @@
     '#description' => t('At what times the blacklist should be checked.'),
   );
   
+  $form['core']['httpbl_rejectcomments'] = array(
+    '#type' => 'checkbox', 
+    '#title' => t('Reject comments'), 
+    '#default_value' => variable_get('httpbl_rejectcomments', 0),
+    '#description' => t('If checking on comments should blacklisted IPs have thier comments rejected (otherwise they will be moderated).'),
+  );
+
   $form['core']['httpbl_message_black'] = array(
     '#type' => 'textarea',
     '#title' => t('Blacklist message'),
@@ -631,11 +646,6 @@
 function _httpbl_check() {
   global $user;
 
-  if (variable_get('httpbl_check', 0) < 2 || (variable_get('httpbl_check', 0) == 2 && $user->uid)) {
-    // Only check when 'for all users' or 'for all anonymous users' is set
-    return;
-  }
-  
   // Testcases at http://www.projecthoneypot.org/httpbl_api.php
   // $ip = '127.1.40.1';
   $ip = _httpbl_ip_address();
