From: dms Date: Thu, 19 Apr 2001 12:11:54 +0000 (+0000) Subject: news: don't list new items if they don't have Text. X-Git-Url: https://git.donarmstrong.com/?a=commitdiff_plain;h=a8b8b641d67103ac84e5d52c4ce8e1072aee4a43;p=infobot.git news: don't list new items if they don't have Text. git-svn-id: https://svn.code.sf.net/p/infobot/code/trunk/blootbot@452 c11ca15a-4712-0410-83d8-924469b57eb5 --- diff --git a/src/Modules/News.pl b/src/Modules/News.pl index ee22362..265da89 100644 --- a/src/Modules/News.pl +++ b/src/Modules/News.pl @@ -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, $_); }