X-Git-Url: https://code.th-h.de/?p=usenet%2Fnewsstats.git;a=blobdiff_plain;f=groupstats.pl;h=ef59cb78baade9d79f3c400686285b930211323d;hp=f758b8c644e4b68d72ee62375c3ad5b476d0a9af;hb=e742bcf55044f7cf2bbb8e47fdca820e35ad36ba;hpb=b802bc3d293272d898eb4f2428e7d1809ebe0be9;ds=inline diff --git a/groupstats.pl b/groupstats.pl index f758b8c..ef59cb7 100755 --- a/groupstats.pl +++ b/groupstats.pl @@ -73,10 +73,15 @@ if ($Options{'l'}) { ### get time period my ($StartMonth,$EndMonth) = &GetTimePeriod($Options{'m'},$Options{'p'}); -# reset to one month for 'dump' output type +# if time period is more than one month: set output type to '-o pretty' or '-o dumpgroup' if ($Options{'o'} eq 'dump' and $Options{'p'}) { - warn ("$MySelf: W: You cannot combine time periods (-p) with '-o dump', changing output type to '-o pretty'.\n"); - $Options{'o'} = 'pretty'; + if (defined($Options{'n'}) and $Options{'n'} !~ /:|\*/) { + warn ("$MySelf: W: You cannot combine time periods (-p) with '-o dump', changing output type to '-o dumpgroup'.\n"); + $Options{'o'} = 'dumpgroup'; + } else { + warn ("$MySelf: W: You cannot combine time periods (-p) with '-o dump', changing output type to '-o pretty'.\n"); + $Options{'o'} = 'pretty'; + } }; ### init database