]> git.donarmstrong.com Git - infobot.git/blobdiff - blootbot/src/modules.pl
wingate -> Wingate
[infobot.git] / blootbot / src / modules.pl
index 3dbda5825fb3ca73d2f545fa3ee823ab5b7967d5..e66af51b3bb9ac6dbfcb0cc54a779c55c43cdc4c 100644 (file)
@@ -22,45 +22,48 @@ if ($@) {
 
 ### MODULES.
 %myModules = (
-       "bzflag"        => "BZFlag.pl",
-       "countdown"     => "Countdown.pl",
-       "debian"        => "Debian.pl",
-       "debianExtra"   => "DebianExtra.pl",
-       "dict"          => "Dict.pl",
-       "dumpvars"      => "DumpVars.pl",
-       "symdump"       => "DumpVars2.pl",
-       "exchange"      => "Exchange.pl",
-       "factoids"      => "Factoids.pl",
-       "kernel"        => "Kernel.pl",
-       "perlMath"      => "Math.pl",
-       "news"          => "News.pl",
-       "plug"          => "Plug.pl",
-       "quote"         => "Quote.pl",
-       "rootwarn"      => "RootWarn.pl",
-       "search"        => "Search.pl",
-       "slashdot"      => "Slashdot3.pl",
-       "topic"         => "Topic.pl",
-       "units"         => "Units.pl",
-       "uptime"        => "Uptime.pl",
-       "ircdcc"        => "UserDCC.pl",
-       "userinfo"      => "UserInfo.pl",
-       "weather"       => "Weather.pl",
-       "wwwsearch"     => "W3Search.pl",
-       "whatis"        => "WhatIs.pl",
-       "wingate"       => "Wingate.pl",
-       "babelfish"     => "babel.pl",
+       "babelfish"     => "babelfish.pl",
+       "botmail"       => "botmail.pl",
+       "BZFlag"        => "BZFlag.pl",
+       "countdown"     => "countdown.pl",
+       "Debian"        => "Debian.pl",
+       "DebianExtra"   => "DebianExtra.pl",
+       "Dict"          => "Dict.pl",
+       "DumpVars"      => "DumpVars.pl",
+       "Exchange"      => "Exchange.pl",
+       "Factoids"      => "Factoids.pl",
+       "HTTPDtype"     => "HTTPDtype.pl",
        "insult"        => "insult.pl",
+       "UserDCC"       => "UserDCC.pl",
+       "Kernel"        => "Kernel.pl",
+       "News"          => "News.pl",
        "nickometer"    => "nickometer.pl",
+       "pager"         => "pager.pl",
+       "Math"          => "Math.pl",
+       "Plug"          => "Plug.pl",
+       "Quote"         => "Quote.pl",
+       "RootWarn"      => "RootWarn.pl",
+       "Rss"           => "Rss.pl",
+       "Search"        => "Search.pl",
+       "slashdot"      => "slashdot.pl",
+       "DumpVars2"     => "DumpVars2.pl",
+       "Topic"         => "Topic.pl",
+       "Units"         => "Units.pl",
+       "Uptime"        => "Uptime.pl",
+       "UserInfo"      => "UserInfo.pl",
+       "Weather"       => "Weather.pl",
+       "wikipedia"     => "wikipedia.pl",
+       "Wingate"       => "Wingate.pl",
+       "wwwsearch"     => "W3Search.pl",
        "zfi"           => "zfi.pl",
        "zippy"         => "Zippy.pl",
        "zsi"           => "zsi.pl",
-       "botmail"       => "botmail.pl",
 );
 ### THIS IS NOT LOADED ON RELOAD :(
 my @myModulesLoadNow;
 my @myModulesReloadNot;
 BEGIN {
-    @myModulesLoadNow  = ('topic', 'uptime', 'news', 'rootWarn', 'symdump', 'botmail');
+    @myModulesLoadNow  = ('Topic', 'Uptime', 'News', 'RootWarn', 'DumpVars2', 'botmail');
     @myModulesReloadNot        = ('IRC/Irc.pl','IRC/Schedulers.pl');
 }
 
@@ -86,7 +89,7 @@ sub loadCoreModules {
 
 sub loadDBModules {
     my $f;
-    # todo: use function to load module.
+    # TODO: use function to load module.
 
     if ($param{'DBType'} =~ /^(mysql|SQLite|pgsql)$/i) {
        eval "use DBI";
@@ -157,7 +160,7 @@ sub loadIRCModules {
            &ERROR("require \"$mod\" => $@");
            &shutdown();
            exit 1;
-        }
+       }
 
        $moduleAge{$mod} = (stat $mod)[9];
        &showProc(" ($_)") if (&IsParam("DEBUG"));
@@ -186,9 +189,7 @@ sub loadMyModulesNow {
            next;
        }
 
-       # weird hack to get rootwarn to work.
-       # it may break on other cases though, any ideas?
-       &loadMyModule( $myModules{$_} || $myModules{lc $_} );
+       &loadMyModule($myModules{$_});
        $loaded++;
     }
 
@@ -203,7 +204,7 @@ sub reloadAllModules {
 
     # obscure usage of map and regex :)
     foreach (map { s/.*?\/?src/src/; $_ } keys %moduleAge) {
-        $retval .= &reloadModule($_);
+       $retval .= &reloadModule($_);
     }
 
     &VERB("Module: reloading done.",2);
@@ -303,7 +304,7 @@ sub loadMyModule {
     my ($tmp) = @_;
     if (!defined $tmp) {
        &WARN("loadMyModule: module is NULL.");
-       return 0; 
+       return 0;
     }
 
     my ($modulename, $modulebase);
@@ -387,8 +388,8 @@ sub getPerlFiles {
     my($dir) = @_;
 
     if (!opendir(DIR, $dir)) {
-        &ERROR("Cannot open source directory ($dir): $!");
-        exit 1;
+       &ERROR("Cannot open source directory ($dir): $!");
+       exit 1;
     }
 
     my @mods;