]> git.donarmstrong.com Git - infobot.git/commitdiff
more configuration crud and not-thinking-correctly design errors
authordms <dms@c11ca15a-4712-0410-83d8-924469b57eb5>
Sat, 3 Feb 2001 16:01:29 +0000 (16:01 +0000)
committerdms <dms@c11ca15a-4712-0410-83d8-924469b57eb5>
Sat, 3 Feb 2001 16:01:29 +0000 (16:01 +0000)
git-svn-id: https://svn.code.sf.net/p/infobot/code/trunk/blootbot@328 c11ca15a-4712-0410-83d8-924469b57eb5

src/IRC/Schedulers.pl
src/Modules/Slashdot3.pl

index e8f09ec089e5e1fe3e71d0cf337d5d74b108832b..0e1fa4b9d7124d74ebacc7ed57fd87ba46aa0d8e 100644 (file)
@@ -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) {
-               &notice($c, "Slashdot: $_");
-           }
+           &notice($_, "Slashdot: $line");
        }
     } );
 }
index b3c406f5ada84efdd2c482ed09809a63bbbe173f..73b5ae1cc544184a00ba4eb44b9d5444c723c740 100644 (file)
@@ -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;