]> git.donarmstrong.com Git - infobot.git/blobdiff - src/modules.pl
- modified db_mysql to allow eleet usage of dbSet
[infobot.git] / src / modules.pl
index 30c5a40c8d9d2d2113ab89e7d0f159ec9bf4e5c4..162279d65c6124a9c5e677edfeefe2dab5eb34f5 100644 (file)
@@ -110,7 +110,11 @@ sub loadDBModules {
     } elsif ($param{'DBType'} =~ /^dbm$/i) {
 
        &status("  using Berkeley DBM 1.85/2.0 support.");
-       require "$bot_src_dir/db_dbm.pl";
+       &ERROR("dbm support is broken... you want it, you fix it!");
+       &shutdown();
+       exit 1;
+
+#      require "$bot_src_dir/db_dbm.pl";
     } else {
 
        &status("DB support DISABLED.");
@@ -369,10 +373,15 @@ if ($@) {
 sub AUTOLOAD {
     return if ($AUTOLOAD =~ /__/);     # internal.
 
-    &ERROR("UNKNOWN FUNCTION CALLED: $AUTOLOAD");
-    foreach (@_) {
-       next unless (defined $_);
-       &status("  => $_");
+    my $str = join(', ', @_);
+    &ERROR("UNKNOWN FUNCTION CALLED: $AUTOLOAD ($str)");
+
+    $AUTOLOAD =~ s/^(\S+):://g;
+
+    if (exists $myModules{lc $AUTOLOAD}) {
+       # hopefully this will work.
+       &DEBUG("Trying to load module $AUTOLOAD...");
+       &loadMyModule(lc $AUTOLOAD);
     }
 }