wwivbbs / wwiv

WWIV BBS Software v5
http://www.wwivbbs.org
Other
186 stars 71 forks source link

wwivutil messages displays the wrong number of messages in the sub when --end used #1181

Closed granitepenguin closed 5 years ago

granitepenguin commented 5 years ago

just noticed when using --end, the number of messages listed at the top of the output is not correct. It looks like it's using the value set for end, which isn't right. I would expect to either always get the total list of the entire sub (which makes the most sense), or show the number of messages being worked against if --start or --end is used (eg, 2 message in the below example, not 10)

When no range defined

wwiv@beaglebbs:~$ ./wwivutil --v=1 messages dump wwivnet | head
Message Sub: 'wwivnet' has 1369 messages.

when --start defined (expected correct? behavior; shows total)

wwiv@beaglebbs:~$ ./wwivutil --v=1 messages dump --start=9  wwivnet | head
Message Sub: 'wwivnet' has 1369 messages.

when --start and --end defined (should be all or only 2)

wwiv@beaglebbs:~$ ./wwivutil --v=1 messages dump --start=9 --end=10 wwivnet 
Message Sub: 'wwivnet' has 10 messages.

when --end defined (should be all or 9)

wwiv@beaglebbs:~$ ./wwivutil --v=1 messages dump --end=9  wwivnet | head
Message Sub: 'wwivnet' has 9 messages.

again, my expectation would be that the total for the entire sub is displayed in all cases.

wwiv commented 5 years ago

Looks like it's either total # of messages (which is what I'd expect), or the value of --end. Not sure why, I'd also just expect the total count of messages (not how many are displayed)