+ if ($pattern) {
+ $hint = "m{\\Q$pattern\\E}i";
+ } else {
+ $hint = "!m{\\^(?:ann|rcmd|talk|chat)\\^}";
+ }
+ if ($who) {
+ $hint .= ' && ' if $hint;
+ $hint .= 'm{\\Q$who\\E}i';
+ }
+ $hint = "next unless $hint" if $hint;
+ $hint .= ";next unless /^\\d+\\^$pattern\\^/" if $pattern;
+ $hint ||= "";
+
+ $eval = qq(while (<\$fh>) {
+ $hint;
+ chomp;
+ \$ring->write(\$_);
+ } );
+
+ if (isdbg('search')) {
+ dbg("sh/log hint: $hint");
+ dbg("sh/log eval: $eval");
+ }
+
+ $fcb->close; # close any open files
+
+ my $months;
+ my $fh = $fcb->open($jdate);
+ L1: for ($months = 0; $months < $maxmonths && @in < $tot; $months++) {
+ my $ref;
+ my $ring = RingBuf->new($tot);