enanobot.php
changeset 4 8f62a406d9d9
parent 3 02e1c3f8f0ef
child 6 a802bb5b3e08
--- a/enanobot.php	Wed May 07 23:33:36 2008 -0400
+++ b/enanobot.php	Wed May 07 23:38:23 2008 -0400
@@ -1,5 +1,5 @@
 <?php
-// define('LIBIRC_DEBUG', '');
+define('LIBIRC_DEBUG', '');
 require('libirc.php');
 require('config.php');
 
@@ -11,7 +11,13 @@
 {
   global $mysql_conn, $mysql_host, $mysql_user, $mysql_pass, $mysql_dbname;
   if ( $mysql_conn )
+  {
     @mysql_close($mysql_conn);
+    if ( defined('LIBIRC_DEBUG') )
+    {
+      echo "< > Reconnecting to MySQL\n";
+    }
+  }
   // connect to MySQL
   $mysql_conn = @mysql_connect($mysql_host, $mysql_user, $mysql_pass);
   if ( !$mysql_conn )