my $time = time();
foreach (keys %seen) {
- my $delta_time = $time - &dbGet("seen", "time", "nick='$_'");
+ my $delta_time = $time - &dbGet("seen", "time", "nick", $_);
next unless ($delta_time > $max_time);
&DEBUG("seenFlushOld: ".&Time2String($delta_time) );
if (scalar keys %netsplitservers) {
if (defined $limit) {
- &DEBUG("chanlimit: removing it for $chan.");
+ &status("chanlimit: netsplit; removing it for $chan.");
&rawout("MODE $chan -l");
$cache{chanlimitChange}{$chan} = time();
}
### run NAMES again and flush it.
}
- next unless (!defined $limit);
if (defined $limit and $limit == $newlimit) {
$cache{chanlimitChange}{$chan} = time();
next;
my ($s1,$s2);
if (@_) {
- &ScheduleThis(30, "netsplitCheck");
+ &ScheduleThis(15, "netsplitCheck");
return if ($_[0] eq "2");
}
### old code.
###
- my $exists = &dbGet("seen", "nick", "nick='$nick'");
+ my $exists = &dbGet("seen", "nick", "nick=".&dbQuote($nick) );
if (defined $exists and $exists) {
&dbUpdate("seen", "nick", $nick, (
sub ircCheck {
if (@_) {
- &ScheduleThis(60, "ircCheck");
+ &ScheduleThis(15, "ircCheck");
return if ($_[0] eq "2"); # defer.
}
return;
}
+ my $age = "New";
if ( -e "$file~" ) {
- $backup++ if ((stat $file)[9] - (stat "$file~")[9] > $time);
+ $backup++ if ((stat $file)[9] - (stat "$file~")[9] > $time);
+ my $delta = time() - (stat "$file~")[9];
+ $age = &Time2String($delta);
} else {
$backup++;
}
- return unless ($backup);
- # should delta be time(file) - time(file~)?
- my $delta = time() - (stat "$file~")[9];
- my $age = &Time2String($delta);
+ return unless ($backup);
### TODO: do internal copying.
&status("Backup: $file ($age)");