]> git.donarmstrong.com Git - infobot.git/blobdiff - src/IRC/Schedulers.pl
- now support verstats for those who don't reply to "CTCP VERSION
[infobot.git] / src / IRC / Schedulers.pl
index 3f284cdf9a23450cd974ca90fc83910db9defc65..c325ab32e22afa416fa8c60ccc43a7dc8ff66678 100644 (file)
@@ -29,7 +29,6 @@ sub setupSchedulers {
     &leakCheck(2);     # mandatory
     &ignoreCheck(1);   # mandatory
     &seenFlushOld(2);
-#    &ircCheck(2);     # mandatory
     &ircCheck(1);      # mandatory
     &miscCheck(1);     # mandatory
     &miscCheck2(2);    # mandatory
@@ -708,6 +707,9 @@ sub ignoreCheck {
            $count++;
        }
     }
+
+    $cache{ignoreCheckTime} = time();
+
     &VERB("ignore: $count items deleted.",2);
 }
 
@@ -717,6 +719,8 @@ sub ircCheck {
        return if ($_[0] eq "2");       # defer.
     }
 
+    $cache{statusSafe} = 1;
+
     my @x      = &getJoinChans();
     my $iconf  = scalar( @x );
     my $inow   = scalar( keys %channels );
@@ -756,15 +760,15 @@ sub ircCheck {
 
     if (grep /^\s*$/, keys %channels) {
        &WARN("ircCheck: we have a NULL chan in hash channels? removing!");
-       if (exists $channels{''}) {
-           &DEBUG("ircCheck: ok it existed!");
-       } else {
-           &DEBUG("ircCheck: this hsould never happen!");
+       if (!exists $channels{''}) {
+           &DEBUG("ircCheck: this should never happen!");
        }
 
        delete $channels{''};
     }
 
+    $cache{statusSafe} = 0;
+
     ### USER FILE.
     if ($utime_userfile > $wtime_userfile and time() - $wtime_userfile > 3600) {
        &writeUserFile();