? bot.patch
? bot_invited_20070420.tar.bz2
? bot_invited_20070420.tar.gz
? bot_invited_20070420.zip
Index: bot.module
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/bot/bot.module,v
retrieving revision 1.9
diff -u -r1.9 bot.module
--- bot.module	18 Nov 2006 04:06:42 -0000	1.9
+++ bot.module	10 May 2007 02:21:22 -0000
@@ -167,5 +167,20 @@
     '#type'          => 'checkbox',
   );
 
+  $form['bot_module_auto_reconnect'] = array(
+                                  '#default_value' => variable_get('bot_module_auto_reconnect', true), // spits out a TON of (useful) stuff.
+                                  '#description'   => t('Reconnect to the server if disconnected'),
+                                  '#options'       => array('0' => t('No'), '1' => t('Yes')),
+                                  '#title'         => t('Auto Reconnect'),
+                                  '#type'          => 'checkbox',
+                                );
+  $form['bot_module_auto_retry'] = array(
+                                  '#default_value' => variable_get('bot_module_auto_retry', true), // spits out a TON of (useful) stuff.
+                                  '#description'   => t('Retry if a server connection fails.'),
+                                  '#options'       => array('0' => t('No'), '1' => t('Yes')),
+                                  '#title'         => t('Auto Retry'),
+                                  '#type'          => 'checkbox',
+                                );
+  
   return system_settings_form($form);
 }
Index: bot_start.php
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/bot/bot_start.php,v
retrieving revision 1.2
diff -u -r1.2 bot_start.php
--- bot_start.php	17 Nov 2006 03:53:37 -0000	1.2
+++ bot_start.php	10 May 2007 02:21:22 -0000
@@ -25,6 +25,9 @@
 
     case '--url':
       $drupal_base_url = parse_url(array_shift($_SERVER['argv']));
+      if (!$drupal_base_url) {
+        die ("Unable to parse url");
+      }
       $_SERVER['HTTP_HOST'] = $drupal_base_url['host'];
       $_SERVER['PHP_SELF'] = $drupal_base_url['path'].'/'.$script_name;
       $_SERVER['REQUEST_URI'] = $_SERVER['SCRIPT_NAME'] = $_SERVER['PHP_SELF'];
@@ -42,8 +45,8 @@
 // initialize the bot with some sane defaults.
 global $irc; $bot = new drupal_wrapper(); $irc = new Net_SmartIRC();
 $irc->setDebug( variable_get('bot_debugging', 0) ? SMARTIRC_DEBUG_ALL : SMARTIRC_DEBUG_NONE );
-$irc->setAutoReconnect(TRUE);  // reconnect to the server if disconnected.
-$irc->setAutoRetry(TRUE);      // retry if a server connection fails.
+$irc->setAutoReconnect(variable_get('bot_module_auto_reconnect', true));  // reconnect to the server if disconnected.
+$irc->setAutoRetry(variable_get('bot_module_auto_retry', true));      // retry if a server connection fails.
 $irc->setChannelSyncing(TRUE); // keep a list of joined users per channel.
 $irc->setUseSockets(TRUE);     // uses real sockets instead of fsock().
 
