]> git.donarmstrong.com Git - infobot.git/commitdiff
- lobotomy cache flush.
authordms <dms@c11ca15a-4712-0410-83d8-924469b57eb5>
Tue, 20 Feb 2001 12:59:09 +0000 (12:59 +0000)
committerdms <dms@c11ca15a-4712-0410-83d8-924469b57eb5>
Tue, 20 Feb 2001 12:59:09 +0000 (12:59 +0000)
- disable uptime if not loaded.
- minor output update.

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

src/IRC/Schedulers.pl

index a0ab80d5c9c45f0c39f83130f3d2c67b8f48665d..65819a176656d3fa77583264b67f2338f106d3aa 100644 (file)
@@ -674,6 +674,12 @@ sub miscCheck {
        CORE::system("/bin/cp $f $f~");
     }
 
+    # flush cache{lobotomy}
+    foreach (keys %{ $cache{lobotomy} }) {
+       next unless (time() - $cache{lobotomy}{$_} > 60*60);
+       delete $cache{lobotomy}{$_};
+    }
+
     ### check modules if they've been modified. might be evil.
     &reloadAllModules();
 }
@@ -742,6 +748,8 @@ sub getNickInUse {
 }
 
 sub uptimeLoop {
+    return unless &IsChanConf("uptime");
+
     if (@_) {
        &ScheduleThis(60, "uptimeLoop");
        return if ($_[0] eq "2");       # defer.
@@ -987,7 +995,7 @@ sub getChanConfDefault {
 
     if (exists $param{$what}) {
        if (!exists $cache{config}{$what}) {
-           &status("gCCD: backward-compat: found param{$what} ($param{$what}) instead.");
+           &status("conf: backward-compat: found param{$what} ($param{$what}) instead.");
            $cache{config}{$what} = 1;
        }
 
@@ -1000,7 +1008,7 @@ sub getChanConfDefault {
     }
 
     $param{$what}      = $default;
-    &status("gCCD: auto-setting param{$what} = $default");
+    &status("conf: auto-setting param{$what} = $default");
     $cache{config}{$what} = 1;
 
     return $default;