Commit 1556f7d8 authored by Nigel Kukard's avatar Nigel Kukard

Inject configuration groups into our hash

parent 43958703
......@@ -123,6 +123,7 @@ sub parseCfgCmdLine
-file => $cfg->{'config_file'},
-nocase => 1
) or die "Failed to open config file '".$cfg->{'config_file'}."': $!";
my $inifileHandle = tied( %inifile );
# Copy config
my %config = %inifile;
......@@ -168,6 +169,17 @@ sub parseCfgCmdLine
}
}
# We may have config file groups we want to remember for other plugins
foreach my $group ($inifileHandle->Groups()) {
# Loop with group members
foreach my $member ($inifileHandle->GroupMembers($group)) {
# Chop off group name and just get the member
my $cleanMember = substr($member,length($group)+1);
# Link the config...
$config{$group}->{$cleanMember} = $config{$member};
}
}
$globals->{'file.config'} = \%config;
$globals->{'config'} = $cfg;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment