]> git.donarmstrong.com Git - infobot.git/blobdiff - blootbot/src/Misc.pl
verbose on reload (time ago, delta time)
[infobot.git] / blootbot / src / Misc.pl
index 0215b4f2eb8b89e36d498f5d0e26789835fc8513..b75fd7e89b80476fc37fcc5cb8825962c3c6550b 100644 (file)
@@ -406,11 +406,12 @@ sub IsHostMatch {
 sub isStale {
     my ($file, $age) = @_;
 
+    &DEBUG("isStale: $file does not exist") unless ( -f $file);
     return 1 unless ( -f $file);
-    return 1 if (time() - (stat($file))[8] > $age*60*60*24);
-    my $delta = time() - (stat($file))[8];
+    return 1 if (time() - (stat($file))[9] > $age*60*60*24);
+    my $delta = time() - (stat($file))[9];
     my $hage  = $age*60*60*24;
-    &DEBUG("isStale: not stale! $delta < $hage ($age) ?");
+    &DEBUG("isStale: not stale! $delta < $hage");
     return 0;
 }
 
@@ -548,7 +549,7 @@ sub validFactoid {
        /\\\%/ and last;
        /\\\_/ and last;
 
-       # weird/special stuff. also old (stock) blootbot bugs.
+       # weird/special stuff. also old blootbot or stock infobot bugs.
        $rhs =~ /( \Q$ident\E's|\Q$ident\E's )/i and last; # ownership.
 
        # duplication.
@@ -623,12 +624,6 @@ sub Forker {
     }
 }
 
-sub checkPing {
-    &DEBUG("checkPing() called.");
-    $conn->schedule(60, \&checkPing, "this is a test");
-    $conn->sl("PING $server :".time());
-}
-
 sub closePID {
     return 1 unless (exists $file{PID});
     return 1 unless ( -f $file{PID});