From 400ddb85c62b47c0e58081445afb3795a996a336 Mon Sep 17 00:00:00 2001 From: dms Date: Fri, 8 Nov 2002 14:29:34 +0000 Subject: [PATCH] - calculated delta time negatively. fixed undefined value. git-svn-id: https://svn.code.sf.net/p/infobot/code/trunk@609 c11ca15a-4712-0410-83d8-924469b57eb5 --- blootbot/src/Modules/News.pl | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/blootbot/src/Modules/News.pl b/blootbot/src/Modules/News.pl index 54e5591..fcf62b9 100644 --- a/blootbot/src/Modules/News.pl +++ b/blootbot/src/Modules/News.pl @@ -789,7 +789,10 @@ sub latest { if (!$flag) { return unless ($unread); - if ($::cache{newsTime} - time() < 5) { + # just a temporary measure not to flood ourself off the + # network with news until we get global notice() and msg() + # throttling. + if (time() - ($::cache{newsTime} || 0) < 5) { &::status("news: not displaying latest notice to $who/$chan."); return; } -- 2.39.5