--- session_limit.orig	2007-05-23 12:41:06.000000000 -0400
+++ session_limit.module	2007-05-23 12:35:58.000000000 -0400
@@ -22,6 +22,12 @@ function session_limit_settings() {
     '#options' => $range,
   );
 
+  $form['session_limit_auto_drop'] = array(
+    '#type' => 'checkbox',
+    '#title' => t('Automatically drop the oldest session without prompting'),
+    '#default_value' => variable_get('session_limit_auto_drop', 0),
+  );
+  
   return $form;
 }
 
@@ -101,6 +107,17 @@ function session_limit_page() {
       drupal_goto();
   }
 
+  if (variable_get("session_limit_auto_drop", 0) == 1) {
+     // get the oldest session
+     $result = db_query('SELECT * from {sessions} where uid = %d order by timestamp limit 1', $user->uid);
+     $obj = db_fetch_object($result);
+
+     // delete oldest session without prompting user
+     db_query('DELETE from {sessions} where sid = "%s"', $obj->sid);
+
+     drupal_goto();
+  }
+
   // Display form. (fallThrough)
   $result = db_query('SELECT * from {sessions} where uid = %d',$user->uid);
   while ($obj =  db_fetch_object($result)) {
