? .DS_Store
? COPYING
? bad-behavior-accept.php
? bad-behavior-banned.php
? bad-behavior-blackhole.php
? bad-behavior-core.php
? bad-behavior-database.php
? bad-behavior-functions.php
? bad-behavior-generic.php
? bad-behavior-google.php
? bad-behavior-http-headers.php
? bad-behavior-konqueror.php
? bad-behavior-lynx.php
? bad-behavior-mediawiki.php
? bad-behavior-movabletype.php
? bad-behavior-mozilla.php
? bad-behavior-msie.php
? bad-behavior-msnbot.php
? bad-behavior-opera.php
? bad-behavior-php4.php
? bad-behavior-protocol.php
? bad-behavior-referer.php
? bad-behavior-safari.php
? bad-behavior-user-agent.php
? bad-behavior-whitelist.php
? bad-behavior-wordpress.php
? badbehavior_5.patch
Index: badbehavior.info
===================================================================
RCS file: badbehavior.info
diff -N badbehavior.info
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ badbehavior.info	24 Dec 2006 16:03:29 -0000
@@ -0,0 +1,3 @@
+; $Id$
+name = Bad behavior
+description = Stop comment spam before it starts by trapping and blocking spambots before they have a chance to post comments.
Index: badbehavior.module
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/badbehavior/badbehavior.module,v
retrieving revision 1.10
diff -u -F^f -r1.10 badbehavior.module
--- badbehavior.module	13 Apr 2006 15:49:30 -0000	1.10
+++ badbehavior.module	24 Dec 2006 16:03:29 -0000
@@ -36,9 +36,6 @@ function badbehavior_help($section='') {
     case "admin/logs/badbehavior":
       $output .= t("<p>The badbehavior module examines HTTP requests of visits to your web site, and any suspicious requests are logged for later review.  The suspicious visit is shown an error page with instructions on how to view the site without triggering the bad behavior error message.");
       break;
-    case "admin/modules#description":
-      $output .= t("Stop comment spam before it starts by trapping and blocking spambots before they have a chance to post comments.");
-      break;
   }
   return $output;
 }
@@ -50,9 +47,13 @@ function badbehavior_menu($may_cache) {
   $items = array();
 
   if ($may_cache) {
-    $items[] = array('path' => 'admin/logs/badbehavior', 'title' => t('bad behavior'),
+    $items[] = array('path' => 'admin/content/badbehavior', 'title' => t('Bad behavior'),
+      'description' => t('Configure automatic spam blocking for your site.'),
+      'callback' => 'badbehavior_settings', 'access' => user_access('administer bad behavior'));
+    $items[] = array('path' => 'admin/logs/badbehavior', 'title' => t('Bad behavior'),
+      'description' => t('Examine the spam blocking logs for your web site.'),
       'callback' => 'badbehavior_overview', 'access' => user_access('administer bad behavior'));
-    $items[] = array('path' => 'admin/logs/badbehavior/event', 'title' => t('details'),
+    $items[] = array('path' => 'admin/logs/badbehavior/event', 'title' => t('Details'),
       'callback' => 'badbehavior_event', 'access' => user_access('administer bad behavior'),
       'type' => MENU_CALLBACK);
   }
@@ -75,11 +76,11 @@ function badbehavior_overview() {
     $rows[] = array('data' =>
       array(
         // Cells
-	$behave->denied_reason,
-	$behave->date,
-	$behave->ip,
-	$behave->http_referrer,
-	$behave->http_user_agent,
+        $behave->denied_reason,
+        $behave->date,
+        $behave->ip,
+        $behave->http_referrer,
+        $behave->http_user_agent,
         l(t('details'), "admin/logs/badbehavior/event/$behave->id")
       )
     );
@@ -96,7 +97,7 @@ function badbehavior_overview() {
 
   $output = theme('table', $header, $rows);
 
-  print theme('page', $output);
+  return $output;
 }
 
 function badbehavior_event($id) {
@@ -120,7 +121,7 @@ function badbehavior_event($id) {
     $output .= ' <tr><th>'. t('Response') .'</th><td>' . $behave->http_response . '</td></tr>';
     $output .= '</table>';
   }
-  print theme('page', $output);
+  return $output;
 }
 
 function badbehavior_perm() {
@@ -129,45 +130,45 @@ function badbehavior_perm() {
 
 function badbehavior_settings() {
   $form['badbehavior_email'] = array(
-				     '#type' => 'textfield',
-				     '#title' => t('Administrator Email'),
-				     '#default_value' => variable_get('badbehavior_email','badbots@ioerror.us'),
-				     '#size' => 50,
-				     '#maxlength' => 50,
-				     '#description' => t('Administrator email address for blocked users to contact to gain access'),
-				     );
+     '#type' => 'textfield',
+     '#title' => t('Administrator Email'),
+     '#default_value' => variable_get('badbehavior_email','badbots@ioerror.us'),
+     '#size' => 50,
+     '#maxlength' => 50,
+     '#description' => t('Administrator email address for blocked users to contact to gain access'),
+   );
   $form['log_settings'] = array(
-		  '#type' => 'fieldset',
-		  '#title' => t('Log Settings'),
-		  );
+    '#type' => 'fieldset',
+    '#title' => t('Log Settings'),
+  );
 
   $form['log_settings']['badbehavior_logging_enable'] = array(
-					      '#type' => 'radios',
-					      '#title' => 'Enable Logging',
-					      '#default_value' => variable_get('bedbehavior_logging_enable',1),
-					      '#options' => array(t('Disabled'),t('Enabled')),
-					      '#description' => t('Enables or disables logging of spam activity'),
-					      );
+    '#type' => 'radios',
+    '#title' => 'Enable Logging',
+    '#default_value' => variable_get('bedbehavior_logging_enable',1),
+    '#options' => array(t('Disabled'),t('Enabled')),
+    '#description' => t('Enables or disables logging of spam activity'),
+  );
   
   $form['log_settings']['badbehavior_verbose_logging_enable'] = array(
-						      '#type' => 'radios',
-						      '#title' => 'Enable Verbose Logging',
-						      '#default_value' => variable_get('badbehavior_verbose_logging_enable',0),
-						      '#options' => array(t('Disabled'),
-									  t('Enabled')),
-						      '#description' => t('Enables or disables verbose logging which includes all requests, not just failed ones '),
-						      );
+    '#type' => 'radios',
+    '#title' => 'Enable Verbose Logging',
+    '#default_value' => variable_get('badbehavior_verbose_logging_enable',0),
+    '#options' => array(t('Disabled'),
+      t('Enabled')),
+    '#description' => t('Enables or disables verbose logging which includes all requests, not just failed ones '),
+  );
   
   $form['log_settings']['badbehavior_logging_duration'] = array(
-						'#type' => 'textfield',
-						'#title' => t('Logging Duration'),
-						'#default_value' => variable_get('badbehavior_logging_duration',7),
-						'#size' => 6,
-						'#maxlength' => 6,
-						'#description' => t('Number of days to hold logs for'),
-						);
+    '#type' => 'textfield',
+    '#title' => t('Logging Duration'),
+    '#default_value' => variable_get('badbehavior_logging_duration',7),
+    '#size' => 6,
+    '#maxlength' => 6,
+    '#description' => t('Number of days to hold logs for'),
+  );
   
-  return $form;
+  return system_settings_form($form);
 }
 
 function badbehavior_init() {
