From 26fe2c7b40566720941d786d73df12613236e27c 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@452 c11ca15a-4712-0410-83d8-924469b57eb5 --- blootbot/src/Modules/News.pl | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/blootbot/src/Modules/News.pl b/blootbot/src/Modules/News.pl index ee22362..265da89 100644 --- a/blootbot/src/Modules/News.pl +++ b/blootbot/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.5