From b8c0edadf1a32997efaec08720f403fb0b9e5b7c Mon Sep 17 00:00:00 2001 From: Elijah Perrault Date: Sat, 29 Jan 2011 16:17:51 -0700 Subject: [PATCH] Only load modules if there's actually modules to load. --- bin/auto | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/bin/auto b/bin/auto index 662849a..765bdd7 100755 --- a/bin/auto +++ b/bin/auto @@ -16,7 +16,7 @@ use Class::Unload; use FindBin qw($Bin); our $Bin = $Bin; 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 DB::Flatfile; use Parser::Config; @@ -167,10 +167,12 @@ else { } # Load modules. -alog "* Loading modules..."; -dbug "* Loading modules..."; -foreach (@{ (conf_get("module"))[0] }) { - mod_load($_); +if (conf_get("module") != 0) { + alog "* Loading modules..."; + dbug "* Loading modules..."; + foreach (@{ (conf_get("module"))[0] }) { + mod_load($_); + } } ## Create sockets.