From a8b8b641d67103ac84e5d52c4ce8e1072aee4a43 Mon Sep 17 00:00:00 2001 From: dms Date: Thu, 19 Apr 2001 12:11:54 +0000 Subject: [PATCH] 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 --- src/Modules/News.pl | 6 ++++++ 1 file changed, 6 insertions(+) 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, $_); } -- 2.39.2