Support for more advanced modules that have their own folders.
This commit is contained in:
1 parent
a9e9631aba
commit
ee58d9902c
1 file changed
+7
-2
@@ -172,7 +172,7 @@ if (!-e "$Bin/../etc/auto.db") {
|
||||
system "touch $Bin/../etc/auto.db";
|
||||
system "chmod a+x $Bin/../etc/auto.db";
|
||||
}
|
||||
our $DB = DBI->connect("dbi:SQLite:dbname=$Bin/../etc/auto.db", q{}, q{});
|
||||
our $DB = DBI->connect("dbi:SQLite:dbname=$Bin/../etc/auto.db", q{}, q{}) or exit;
|
||||
|
||||
# Parse privileges.
|
||||
our (%PRIVILEGES);
|
||||
@@ -446,8 +446,13 @@ sub mod_load {
|
||||
if (-e "$Bin/../modules/$module.pm") {
|
||||
do "$Bin/../modules/$module.pm" and return 1;
|
||||
}
|
||||
else {
|
||||
if (-e "$Bin/../modules/$module/main.pm") {
|
||||
do "$Bin/../modules/$module/main.pm" and return 1;
|
||||
}
|
||||
}
|
||||
|
||||
return 0;
|
||||
return;
|
||||
}
|
||||
|
||||
# vim: set ai sw=4 ts=4:
|
||||
Reference in new issue
Block a user