]> git.donarmstrong.com Git - infobot.git/blobdiff - src/modules.pl
OnJoin - tensai, fixes by TimRiker
[infobot.git] / src / modules.pl
index a1cc28f256bfaca0a094e694aafa6a13dd5c82ce..961b90b7a3d8713ab8a6c020c085d8789f8061c2 100644 (file)
@@ -5,9 +5,9 @@
 #     Created: 20000624
 #
 
-# use strict;  # TODO
+use strict;
 
-use vars qw($AUTOLOAD);
+use vars qw($AUTOLOAD $no_timehires);
 
 ###
 ### REQUIRED MODULES.
@@ -24,7 +24,7 @@ if ($@) {
 my @myModulesLoadNow;
 my @myModulesReloadNot;
 BEGIN {
-    @myModulesLoadNow  = ('Topic', 'Uptime', 'News', 'RootWarn', 'DumpVars2', 'botmail');
+    @myModulesLoadNow  = ('Topic', 'Uptime', 'News', 'RootWarn', 'DumpVars2', 'botmail', 'OnJoin');
     @myModulesReloadNot        = ('IRC/Irc.pl','IRC/Schedulers.pl');
 }
 
@@ -52,7 +52,7 @@ sub loadDBModules {
     my $f;
     # TODO: use function to load module.
 
-    if ($param{'DBType'} =~ /^(mysql|SQLite|pgsql)$/i) {
+    if ($param{'DBType'} =~ /^(mysql|SQLite(2)?|pgsql)$/i) {
        eval "use DBI";
        if ($@) {
            &ERROR("No support for DBI::" . $param{'DBType'} . ", exiting!");
@@ -203,8 +203,7 @@ sub reloadModule {
 
        if ($age < $moduleAge{$file}) {
            &WARN("rM: we're not gonna downgrade '$file'; use touch.");
-           &DEBUG("age => $age");
-           &DEBUG("mA{$file} => $moduleAge{$file}");
+           &DEBUG("age => $age, mA{$file} => $moduleAge{$file}");
            return $retval;
        }