- if (!opendir(DIR, "$bot_src_dir/IRC")) {
- &ERROR("can't open source directory Factoids: $!");
- exit 1;
- }
+ foreach ( &getPerlFiles("$bot_src_dir/$interface") ) {
+ my $mod = "$bot_src_dir/$interface/$_";
+
+ # 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\" => $@");
+ &shutdown();
+ exit 1;
+ }