Commit Diff


commit - c47c8f57b66d9dd4baa433930e8c9d421e5f3e70
commit + 4a5edd448d52226ffcd9d73879c2da2ba176d856
blob - 226ba4973e78526a07480176f13bc7f24aff96cd
blob + 06a915548218a8e430c69b7fbab1af6849b48d68
--- botnow
+++ botnow
@@ -62,11 +62,6 @@ $conf{pass} = $conf{pass} or die "ERROR: botnow.conf: 
 # Comma-separated list of channels for requesting bouncers
 $conf{chans} = $conf{chans} or die "ERROR: botnow.conf: chans";
 
-my @networks;
-if (defined($conf{networks})) {
-	@networks = split(/\s+/, $conf{networks});
-}
-
 # Mail from address
 if (!defined($conf{mailname})) {
 	if ($conf{mailfrom} =~ /^([^@]+)@/) {
@@ -113,7 +108,11 @@ foreach my $mod (@modules) {
 
 # Globals used from IRCNOW::IO::IRC;
 # XXX These need to become an object in IRCNOW::IO::IRC instead of globals
-my $bots = \@IRCNOW::IO::IRC::bots;
+#if (defined($conf{networks})) {
+#	@IRCNOW::IO::IRC::networks = split(/\s+/, $conf{networks});
+#}
+
+#my $bots = \@IRCNOW::IO::IRC::bots;
 my $call = $IRCNOW::IO::IRC::call;
 my $localnet = $conf{localnet};
 $IRCNOW::IO::IRC::localnet = $localnet;
@@ -124,7 +123,7 @@ my $verbosity = $conf{verbose};
 $IRCNOW::IO::backupspath = $conf{backupspath} ||  "/home/botnow/backups/";
 my $backupspath = $IRCNOW::IO::backupspath;
 my $irc = new IRCNOW::IO::IRC(
-	networks => \@networks,
+	networks => [split(/\s+/, $conf{networks})],
 	localnet => $conf{localnet},
 	stafflist => [split(/ /, $staff)],
 	nick => $conf{nick},
@@ -132,7 +131,7 @@ my $irc = new IRCNOW::IO::IRC(
 	port => $conf{port},
 	pass => $conf{pass},
 );
-
+my $bots=$irc->{bots};
 my @chans = split /[,\s]+/m, $conf{chans};
 my @teamchans;
 if (defined($conf{teamchans})) { @teamchans = split /[,\s]+/m, $conf{teamchans}; }