From: dms Date: Sat, 3 Feb 2001 16:01:29 +0000 (+0000) Subject: more configuration crud and not-thinking-correctly design errors X-Git-Url: https://git.donarmstrong.com/?a=commitdiff_plain;h=6377b101d1be58dac6e89a78aeea83bf4ad91320;p=infobot.git more configuration crud and not-thinking-correctly design errors git-svn-id: https://svn.code.sf.net/p/infobot/code/trunk@328 c11ca15a-4712-0410-83d8-924469b57eb5 --- diff --git a/blootbot/src/IRC/Schedulers.pl b/blootbot/src/IRC/Schedulers.pl index e8f09ec..0e1fa4b 100644 --- a/blootbot/src/IRC/Schedulers.pl +++ b/blootbot/src/IRC/Schedulers.pl @@ -29,7 +29,7 @@ sub setupSchedulers { &ignoreCheck(1); # mandatory &seenFlushOld(1); &ircCheck(1); # mandatory - &miscCheck(1); # mandatory + &miscCheck(2); # mandatory &shmFlush(1); # mandatory &slashdotLoop(2); &freshmeatLoop(2); @@ -726,16 +726,14 @@ sub slashdotLoop { return unless (scalar @chans); &Forker("slashdot", sub { - my @data = &Slashdot::slashdotAnnounce(); + my $line = &Slashdot::slashdotAnnounce(); + return unless (defined $line); foreach (@chans) { next unless (&::validChan($_)); &::status("sending slashdot update to $_."); - my $c = $_; - foreach (@data) { - ¬ice($c, "Slashdot: $_"); - } + ¬ice($_, "Slashdot: $line"); } } ); } diff --git a/blootbot/src/Modules/Slashdot3.pl b/blootbot/src/Modules/Slashdot3.pl index b3c406f..73b5ae1 100644 --- a/blootbot/src/Modules/Slashdot3.pl +++ b/blootbot/src/Modules/Slashdot3.pl @@ -96,18 +96,8 @@ sub slashdotAnnounce { } close OUT; - my $line = "Slashdot: News for nerds, stuff that matters -- ". + return "Slashdot: News for nerds, stuff that matters -- ". join(" \002::\002 ", @new); - - my @chans = split(/[\s\t]+/, lc $::param{'slashdotAnnounce'}); - @chans = keys(%::channels) unless (scalar @chans); - foreach (@chans) { - next unless (&::validChan($_)); - - &::status("sending slashdot update to $_."); - &::notice($_, $line); - } - sleep 1; # just in case? } 1;