+ $text .= sprintf " (%u selective)", $uciinfo{'seldepth'};
+ }
+ $text .= "\n\n";
+ }
+
+ if ($last_text ne $text) {
+ print "\e[H\e[2J"; # clear the screen
+ print $text;
+ $last_text = $text;
+ }
+
+ # see if a new tell is called for -- it is if the delay has expired _and_
+ # this is not simply a repetition of the last one
+ if ($last_told_text ne $text && defined($telltarget)) {
+ my $now = time;
+ for my $iv (@tell_intervals) {
+ last if ($now - $last_move < $iv);
+ next if ($last_tell - $last_move >= $iv);
+
+ for my $line (split /\n/, $text) {
+ $t->print("tell $telltarget [$target] $line");
+ }
+
+ $last_told_text = $text;
+ $last_tell = $now;
+
+ last;