]> git.donarmstrong.com Git - infobot.git/blobdiff - src/modules.pl
add initial SQLite support
[infobot.git] / src / modules.pl
index 0cae3423342c6aae1ecdb2783eba3613b944e314..ae2dac531699f771d1b09400cd0852303562b0a0 100644 (file)
@@ -31,9 +31,9 @@ if ($@) {
        "factoids"      => "Factoids.pl",
        "freshmeat"     => "Freshmeat.pl",
        "kernel"        => "Kernel.pl",
-       "ircdcc"        => "UserDCC.pl",
        "perlMath"      => "Math.pl",
        "news"          => "News.pl",
+       "plug"          => "Plug.pl",
        "quote"         => "Quote.pl",
        "rootwarn"      => "RootWarn.pl",
        "search"        => "Search.pl",
@@ -41,15 +41,16 @@ if ($@) {
        "topic"         => "Topic.pl",
        "units"         => "Units.pl",
        "uptime"        => "Uptime.pl",
+       "ircdcc"        => "UserDCC.pl",
        "userinfo"      => "UserInfo.pl",
        "wwwsearch"     => "W3Search.pl",
        "whatis"        => "WhatIs.pl",
        "wingate"       => "Wingate.pl",
-       "zfi"           => "zfi.pl",
-       "zsi"           => "zsi.pl",
+       "babelfish"     => "babel.pl",
        "insult"        => "insult.pl",
        "nickometer"    => "nickometer.pl",
-       "babelfish"     => "babel.pl",
+       "zfi"           => "zfi.pl",
+       "zsi"           => "zsi.pl",
 );
 ### THIS IS NOT LOADED ON RELOAD :(
 my @myModulesLoadNow;
@@ -104,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;
@@ -159,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\" => $@");