Only load modules if there's actually modules to load.

This commit is contained in:
Elijah Perrault committed 2011-01-29 16:17:51 -07:00
1 parent 8aa8962764
commit b8c0edadf1
1 file changed
+7 -5
+7 -5
View File
@@ -16,7 +16,7 @@ use Class::Unload;
use FindBin qw($Bin); use FindBin qw($Bin);
our $Bin = $Bin; our $Bin = $Bin;
BEGIN { unshift(@INC, "$Bin/../src"); } BEGIN { unshift(@INC, "$Bin/../src"); }
use API::Std qw(conf_get err); use API::Std qw(conf_get err cmd_add cmd_del);
use API::Log qw(println alog dbug); use API::Log qw(println alog dbug);
use DB::Flatfile; use DB::Flatfile;
use Parser::Config; use Parser::Config;
@@ -167,10 +167,12 @@ else {
} }
# Load modules. # Load modules.
alog "* Loading modules..."; if (conf_get("module") != 0) {
dbug "* Loading modules..."; alog "* Loading modules...";
foreach (@{ (conf_get("module"))[0] }) { dbug "* Loading modules...";
mod_load($_); foreach (@{ (conf_get("module"))[0] }) {
mod_load($_);
}
} }
## Create sockets. ## Create sockets.