-push (@out, "Chat groups recently used:");
-push (@out, "($to messages searched)");
-push (@out, "--------------------------");
-my @calls;
-my @l;
-my $max = 6;
-my $mtext;
-foreach $group (sort { $g->{$b}->{sec} <=> $g->{$a}->{sec} } keys %$g) {
- @calls = sort( @{ $g->{$group}->{calls} } );
- $mtext = " " . $g->{$group}->{msgcount} . " messages by:";
- push (@out, "$group: Last active " . $g->{$group}->{last});
- if (@calls <= $max) {
- push (@out, "$mtext @calls");
- } else {
- foreach $call(@calls) {
- push @l, $call;
- if (@l >= $max) {
- if ($max == 6) {
- push (@out, "$mtext @l");
- } else {
- push (@out, " @l");
- }
- @l = ();
- $max = 8;
- }
- }
- push (@out, " @l") if (@l);
- $max = 6;
- @l = ();
- }
- push (@out, "-");
+ push (@out, "Chat groups recently used:");
+ push (@out, "($to messages searched)");
+ push (@out, "--------------------------");
+ my @calls;
+ my @l;
+ my $max = 6;
+ my $mtext;
+ foreach $group (sort { $g->{$b}->{sec} <=> $g->{$a}->{sec} } keys %$g) {
+ @calls = sort( @{ $g->{$group}->{calls} } );
+ $mtext = " " . $g->{$group}->{msgcount} . " messages by:";
+ push (@out, "$group: Last active " . $g->{$group}->{last});
+ if (@calls <= $max) {
+ push (@out, "$mtext @calls");
+ }
+ else {
+ foreach $call(@calls) {
+ push @l, $call;
+ if (@l >= $max) {
+ if ($max == 6) {
+ push (@out, "$mtext @l");
+ }
+ else {
+ push (@out, " @l");
+ }
+ @l = ();
+ $max = 8;
+ }
+ }
+ push (@out, " @l") if (@l);
+ $max = 6;
+ @l = ();
+ }
+ push (@out, "-");
+ }
+ $self->send(@out) if @out;
+ });
+
+ # my @chatlog = DXLog::print(undef, $to, $main::systime, 'chat', undef);
+ return (1, @out);