### MODULES.
%myModules = (
+ "bzflag" => "BZFlag.pl",
"countdown" => "Countdown.pl",
"debian" => "Debian.pl",
"debianExtra" => "DebianExtra.pl",
"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",
"topic" => "Topic.pl",
"units" => "Units.pl",
"uptime" => "Uptime.pl",
+ "ircdcc" => "UserDCC.pl",
"userinfo" => "UserInfo.pl",
"wwwsearch" => "W3Search.pl",
"whatis" => "WhatIs.pl",
"wingate" => "Wingate.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;
}
sub loadDBModules {
- &status("Loading DB modules...");
-
my $f = "$bot_src_dir/modules.pl";
$moduleAge{$f} = (stat $f)[9];
&ERROR("libdbd-mysql-perl is not installed!");
exit 1;
}
- &showProc(" (DBI // mysql)");
-
- &status(" using MySQL support.");
+ &status("Loading MySQL support.");
$f = "$bot_src_dir/db_mysql.pl";
require $f;
$moduleAge{$f} = (stat $f)[9];
-
+ &showProc(" (DBI // mysql)");
} elsif ($param{'DBType'} =~ /^pgsql$/i) {
# eval "use Pg";
eval "use DBI";
&ERROR("libpgperl is not installed!");
exit 1;
}
- &showProc(" (pgsql)");
-
- &status(" using pgsql support.");
+ &status("Loading pgsql support.");
require "$bot_src_dir/db_pgsql.pl";
-
+ &showProc(" (pgsql)");
} elsif ($param{'DBType'} =~ /^dbm$/i) {
-
- &status(" using Berkeley DBM 1.85/2.0 support.");
- &ERROR("dbm support is broken... if you want it, fix it yourself!");
- &shutdown();
- exit 1;
-
-# require "$bot_src_dir/db_dbm.pl";
+ &status("Loading Berkeley DBM support.");
+ $f = "$bot_src_dir/db_dbm.pl";
+ require $f;
+ $moduleAge{$f} = (stat $f)[9];
+ &showProc(" $bot_src_dir/db_dbm.pl");
} else {
-
&status("DB support DISABLED.");
return;
}
}
sub loadIRCModules {
- if (&whatInterface() =~ /IRC/) {
+ my ($interface) = &whatInterface();
+ if ($interface =~ /IRC/) {
&status("Loading IRC modules...");
eval "use Net::IRC";
exit 1;
}
&showProc(" (Net::IRC)");
-
} else {
&status("IRC support DISABLED.");
- return;
+ # disabling forking.
+ $param{forking} = 0;
+ $param{noSHM} = 1;
}
- foreach ( &getPerlFiles("$bot_src_dir/IRC") ) {
- my $mod = "$bot_src_dir/IRC/$_";
+ foreach ( &getPerlFiles("$bot_src_dir/$interface") ) {
+ my $mod = "$bot_src_dir/$interface/$_";
+ &status("Loading Modules \"$mod\"");
eval "require \"$mod\"";
if ($@) {
- &ERROR("lIRCM => $@");
+ &ERROR("require \"$mod\" => $@");
&shutdown();
exit 1;
}
return if ($AUTOLOAD =~ /__/); # internal.
my $str = join(', ', @_);
- &ERROR("UNKNOWN FUNCTION CALLED: $AUTOLOAD ($str)");
+ my ($package, $filename, $line) = caller;
+ &ERROR("UNKNOWN FUNCTION CALLED: $AUTOLOAD ($str) $filename line $line");
$AUTOLOAD =~ s/^(\S+):://g;