aboutsummaryrefslogtreecommitdiff
path: root/sb_config.pm
diff options
context:
space:
mode:
Diffstat (limited to 'sb_config.pm')
-rw-r--r--sb_config.pm8
1 files changed, 7 insertions, 1 deletions
diff --git a/sb_config.pm b/sb_config.pm
index dcff683..ade80b8 100644
--- a/sb_config.pm
+++ b/sb_config.pm
@@ -8,7 +8,7 @@ use Config::Tiny;
sub parse_config
{
- my @scalar_configs = ('nick', 'username', 'ircname', 'server', 'port', 'password', 'must_id');
+ my @scalar_configs = ('nick', 'username', 'ircname', 'server', 'port', 'password', 'must_id', 'user', 'group');
my @list_configs = ('channels', 'ignore', 'admins');
my $file = $_[0];
my %built_config;
@@ -35,6 +35,12 @@ sub parse_config
$triggers{$match} = $response;
}
+ $built_config{uid} = getpwnam($built_config{user})
+ or die "Cannot get uid of $built_config{user}: $!\n";
+ $built_config{gid} = getgrnam($built_config{group})
+ or die "Cannot get gid of $built_config{group}: $!\n";
+
+
$built_config{triggers} = \%triggers;
return %built_config;