]> git.donarmstrong.com Git - infobot.git/commitdiff
news: don't list new items if they don't have Text.
authordms <dms@c11ca15a-4712-0410-83d8-924469b57eb5>
Thu, 19 Apr 2001 12:11:54 +0000 (12:11 +0000)
committerdms <dms@c11ca15a-4712-0410-83d8-924469b57eb5>
Thu, 19 Apr 2001 12:11:54 +0000 (12:11 +0000)
git-svn-id: https://svn.code.sf.net/p/infobot/code/trunk/blootbot@452 c11ca15a-4712-0410-83d8-924469b57eb5

src/Modules/News.pl

index ee223621fd116ea7c32fa4714fde4cc67e7db6f4..265da899bf4733f9d16b72658a0151f4334e8818 100644 (file)
@@ -688,6 +688,12 @@ sub latest {
        next if (!defined $t);
        next if ($t > $::news{$chan}{$_}{Time});
 
+       # don't list new items if they don't have Text.
+       if (!exists $::news{$chan}{$_}{Text}) {
+           &::WARN("news: news{$chan}{$_}{Text} undef.");
+           next;
+       }
+
        push(@new, $_);
     }