]> git.donarmstrong.com Git - infobot.git/blobdiff - src/modules.pl
add initial SQLite support
[infobot.git] / src / modules.pl
index 9d54aa1204f1dfbcc171a50177b4ac10ea08a8f7..ae2dac531699f771d1b09400cd0852303562b0a0 100644 (file)
@@ -105,12 +105,12 @@ sub loadDBModules {
        &status("Loading pgsql support.");
        require "$bot_src_dir/db_pgsql.pl";
        &showProc(" (pgsql)");
-    } elsif ($param{'DBType'} =~ /^dbm$/i) {
-       &status("Loading Berkeley DBM support.");
-       $f = "$bot_src_dir/db_dbm.pl";
-       require $f;
+    } elsif ($param{'DBType'} =~ /^sqlite$|^dbm$/i) {
+       &status("Loading " . $param{'DBType'} . " support.");
+       $f="$bot_src_dir/db_" . $param{'DBType'} . ".pl";
        $moduleAge{$f} = (stat $f)[9];
-       &showProc(" $bot_src_dir/db_dbm.pl");
+       require $f;
+       &showProc(" $bot_src_dir/db_" . $param{'DBType'} . ".pl");
     } else {
        &status("DB support DISABLED.");
        return;
@@ -160,7 +160,9 @@ sub loadIRCModules {
     foreach ( &getPerlFiles("$bot_src_dir/$interface") ) {
        my $mod = "$bot_src_dir/$interface/$_";
 
-       &status("Loading Modules \"$mod\"");
+       # hrm... use another config option besides DEBUG to display
+       # change in memory usage.
+       &status("Loading Modules \"$mod\"") if (!&IsParam("DEBUG"));
        eval "require \"$mod\"";
        if ($@) {
            &ERROR("require \"$mod\" => $@");