Index: cas.module
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/cas/cas.module,v
retrieving revision 1.67
diff -u -r1.67 cas.module
--- cas.module	19 Feb 2010 16:34:10 -0000	1.67
+++ cas.module	19 Feb 2010 16:55:44 -0000
@@ -1,5 +1,5 @@
 <?php
-// $Id: cas.module,v 1.67 2010/02/19 16:34:10 metzlerd Exp $
+// $Id: cas.module,v 1.66 2010/02/18 21:15:50 metzlerd Exp $
 
 /**
  * @file Enables users to authenticate via a Central Authentication Service (CAS)
@@ -925,6 +925,36 @@
   if ($_COOKIE['cas_login_checked']) { 
     return FALSE; 
   }
+  
+  // Check to see if we've got a search bot.  
+  $crawlers = array(
+    'Google',
+    'msnbot', 
+    'Rambler',
+    'Yahoo',
+    'AbachoBOT',
+    'accoona', 
+    'AcoiRobot',
+    'ASPSeek',
+    'CrocCrawler',
+    'Dumbot', 
+    'FAST-WebCrawler',
+    'GeonaBot',
+    'Gigabot',
+    'Lycos',
+    'MSRBOT', 
+    'Scooter', 
+    'AltaVista', 
+    'IDBot', 
+    'eStyle',
+    'Scrubby',
+    );
+  // Return on the first find.
+  foreach ($crawlers as $c) {
+     if (stripos($_SERVER['HTTP_USER_AGENT'], $c)!==FALSE) {
+       return FALSE;
+     }     
+  }
 
   // No need if we're on the cas login page. 
   list($arg0) = split('/', $_GET['q']);
