commit 8f4329e0912d83451fdc7afcb47a1f840e4d1d15 from: Izzy Blacklock date: Fri Aug 04 23:29:35 2023 UTC moved converting config strings to arrays to IRCNOW::IO::IRC::new() Goal is to be able to pass the $conf object parsed from the config file to IRCNOW::IO::IRC::new() directly. commit - 029d7e66cc971a4f5a97ac4fd76713e8de6e5b80 commit + 8f4329e0912d83451fdc7afcb47a1f840e4d1d15 blob - 50d54cb85c9f33c6dc606e54381dd5410901d0cf blob + a240a417b8eba7f449b51fbb91393d3df4feb6da --- botnow +++ botnow @@ -111,8 +111,6 @@ my $verbosity = $conf{verbose}; $IRCNOW::IO::backupspath = $conf{backupspath} || "/home/botnow/backups/"; my $backupspath = $IRCNOW::IO::backupspath; -my $staff = $conf{staff}; -my $localnet = $conf{localnet}; unveil("./", "r") or die "Unable to unveil $!"; unveil("$confpath", "r") or die "Unable to unveil $!"; @@ -127,16 +125,16 @@ unveil() or die "Unable to lock unveil $!"; pledge( qw(stdio rpath wpath cpath inet dns proc exec flock fattr) ) or die "Unable to pledge: $!"; my $irc = new IRCNOW::IO::IRC( - networks => [split(/\s+/, $conf{networks})], localnet => $conf{localnet}, - stafflist => [split(/ /, $staff)], + staff => $conf{staff}, nick => $conf{nick}, host => $conf{host}, port => $conf{port}, pass => $conf{pass}, expires => $conf{expires}, - chans => [split /[,\s]+/m, $conf{chans}], - teamchans => [split /[,\s]+/m, $conf{teamchans}], + networks => $conf{networks}, + chans => $conf{chans}, + teamchans => $conf{teamchans}, ); $irc->run();