### run NAMES again and flush it.
}
- next unless (!defined $limit or $limit != $newlimit);
+ next unless (!defined $limit);
+ if ($limit == $newlimit) {
+ $cache{chanlimitChange}{$chan} = time();
+ next;
+ }
if (!exists $channels{$chan}{'o'}{$ident}) {
&status("ChanLimit: dont have ops on $chan.") unless (exists $cache{warn}{chanlimit}{$chan});
delete $sched{"leakCheck"}{RUNNING};
}
- # flood.
+ # flood. this is dealt with in floodLoop()
foreach $blah1 (keys %flood) {
foreach $blah2 (keys %{ $flood{$blah1} }) {
$count += scalar(keys %{ $flood{$blah1}{$blah2} });
$count += scalar(keys %{ $floodjoin{$blah1}{$blah2} });
}
}
- &DEBUG("leak: hash flood has $count total keys.",2);
+ &DEBUG("leak: hash floodjoin has $count total keys.",2);
# floodwarn.
$count = scalar(keys %floodwarn);
}
}
+ # chanstats
+ $count = scalar(keys %chanstats);
+ &DEBUG("leak: hash chanstats has $count total keys.",2);
+
+ # nuh.
my $delete = 0;
foreach (keys %nuh) {
next if (&IsNickInAnyChan($_));
delete $sched{"ircCheck"}{RUNNING};
}
- my @array = grep !/^_default$/, keys %chanconf;
- my $iconf = scalar(@array);
- my $inow = scalar(keys %channels);
+ my @x = &getJoinChans();
+ my $iconf = scalar( @x );
+ my $inow = scalar( keys %channels );
if ($iconf > 2 and $inow * 2 <= $iconf) {
&FIXME("ircCheck: current channels * 2 <= config channels. FIXME.");
+ @joinchan = @x;
+ &joinNextChan();
}
if (!$conn->connected or time() - $msgtime > 3600) {
### this is semi-scheduled
sub getNickInUse {
+ &DEBUG("gNIU: ident => $ident, ircNick => $param{'ircNick'}");
if ($ident eq $param{'ircNick'}) {
&status("okay, got my nick back.");
return;
foreach (@list) {
my $age = &getFactInfo($_, "modified_time");
+
if (!defined $age or $age !~ /^\d+$/) {
- &WARN("age == NULL or not numeric.");
+ if (scalar @list > 50) {
+ if (!$cache{warnDel}) {
+ &WARN("list is over 50 (".scalar(@list)."... giving it a miss.");
+ $cache{warnDel} = 1;
+ last;
+ }
+ }
+
+ &WARN("old cruft (no time): $_");
+ &delFactoid($_);
next;
}
}
return unless ($backup);
+ my $age = &Time2String(time() - (stat $file)[9]);
+
### TODO: do internal copying.
- &status("Backup: $file to $file~");
+ &status("Backup: $file ($age)");
CORE::system("/bin/cp $file $file~");
}