]> git.donarmstrong.com Git - infobot.git/commitdiff
- calculated delta time negatively.
authordms <dms@c11ca15a-4712-0410-83d8-924469b57eb5>
Fri, 8 Nov 2002 14:29:34 +0000 (14:29 +0000)
committerdms <dms@c11ca15a-4712-0410-83d8-924469b57eb5>
Fri, 8 Nov 2002 14:29:34 +0000 (14:29 +0000)
  fixed undefined value.

git-svn-id: https://svn.code.sf.net/p/infobot/code/trunk/blootbot@609 c11ca15a-4712-0410-83d8-924469b57eb5

src/Modules/News.pl

index 54e5591fc9098fb77a9e097f6feb87b86ee57816..fcf62b9ca28bba6a357fedff093902811cbb291d 100644 (file)
@@ -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;
        }