3
0
mirror of https://github.com/pragma-/pbot.git synced 2025-01-11 12:32:37 +01:00

Improve Net::IRC pacing to ignore pacing for initial 8 lines in a squelch

This commit is contained in:
Pragmatic Software 2018-07-02 23:34:11 -07:00
parent c1db40d216
commit 7b6bb688be

View File

@ -1391,6 +1391,10 @@ sub sl {
if (! $self->pacing) {
return $self->sl_real($line);
}
if (++$self->{_slcount} <= 8) {
return $self->schedule_output_event(0, \&sl_real, $line);
}
# calculate how long to wait before sending this line
my $time = time;
@ -1406,7 +1410,9 @@ sub sl {
print STDERR "S-> $seconds $line\n";
}
print STDERR "S-> $seconds $line\n";
if ($seconds == 0) {
$self->{_slcount} = 0;
}
$self->schedule_output_event($seconds, \&sl_real, $line);
}