From: dms Date: Fri, 8 Nov 2002 14:29:34 +0000 (+0000) Subject: - calculated delta time negatively. X-Git-Url: https://git.donarmstrong.com/?a=commitdiff_plain;h=400ddb85c62b47c0e58081445afb3795a996a336;p=infobot.git - 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 --- 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; }