Hi DM,
On my BBS, while doing some testing, I tried setting my newscan pointers for all sub-boards to the current date & time (in the stock shell, this would be from the main menu, & for "Message scan config" and then P for "Set new-scan pointers").
Then in JS, I checked the value of scan_ptr in the msg_area.grp_list.sub_list array for the sub-board. I thought the value of that scan_ptr value might be the last message (since I had just set my scan pointers to the current date & time), but it seems the value of that scan_ptr could be less than that.
The documentation for scan_ptr says this:
User's current new message scan pointer (highest-read message number)
When the documentation says "new message scan pointer", it sounds like what it means is the user's last read message?
Or should it be what the user has
set by doing a newscan pointer configuration?
If that scan_ptr is the user's last read message, is there another variable in the Synchronet JS object model that represents the message number in the sub-board as configured in the user's newscan configuration?
'scan_ptr' is the message number that represents their highest read message number. Any messages with a higher number (higher than the scan_ptr value) will be considered "new".
Re: msg_area.grp_list.sub_list scan_ptr
By: Digital Man to Nightfox on Sat Apr 27 2024 08:34 pm
'scan_ptr' is the message number that represents their highest read message number. Any messages with a higher number (higher than the scan_ptr value) will be considered "new".
So, the test that I did was this:
I first created a new (temporary) user account. I logged in with that user account and then set the scan pointer for all sub-boards to the current date & time. I did a newscan using the stock Synchronet reader, and it scanned all sub-boards and said there were no new messages (which I think was expected, since I had set the newscan poniters to the current date & time). I then did a newscan with my DDMsgReader (which uses scan_ptr), and it started at the first sub-board and showed the first message in that sub-board. If scan_ptr is the user's highest read message number, I think that makes sense. But I'm wondering if there's anything in JS that points to the user's configured newscan pointer instead?
I'll experiment here and be sure that msg_area.sub[].scan_ptr is behaving as expected, but I'm pretty sure other script authors (e.g. echicken) are using it successfully.
I'll experiment here and be sure that msg_area.sub[].scan_ptr is behaving
as expected, but I'm pretty sure other script authors (e.g. echicken) are
using it successfully.
So just did some testing here, and it seems to be working as expected.
I used ;eval msg_area.sub["test"].scan_ptr to display the value of the scan pointer for my "test" sub. When I update the scan pointer using either &p or by reading that sub, the JS representation changed accordingly. It seems to be working correctly.
Digital Man wrote to Nightfox <=-
'scan_ptr' is the message number that represents their highest read message number. Any messages with a higher number (higher than the scan_ptr value) will be considered "new". --
I put DDMsgreader back on a few days ago, and manually reset any of the areas that reset to #1. I pulled a couple of QWK packets over the past
few days, and when I did a newscan, 2 of the DOVE echoes newscan
pointers were set to message number 1.
I'm not ruling out an issue on my end - could this be a message board corruption issue?
I'm not ruling out an issue on my end - could this be a message board corruption issue?
You can always try chksmb and/or fixsmb on your sub-boards too see if there's anything wrong with them, just in case.
I brought this up to Nightfox a couple months ago and he told me he had noticed it in the past, but couldn't reproduce the issue.
It became impossible for me to describe it any clearer, so I figured I'd just wait it out until he was able to see the issue again for himself.
I don't think so. The issue doesn't happen when using the built-in message scan/reading functions, I'm inclined to believe there's just an issue with DDMsgReader.
User's msg-scan config and ptrs are stored in data/user/*.subs, so that's where I'd look while trying to diagnose this problem.
Re: Re: msg_area.grp_list.sub_list scan_ptr
By: Digital Man to poindexter FORTRAN on Sun Apr 28 2024 01:48 pm
I don't think so. The issue doesn't happen when using the built-in message scan/reading functions, I'm inclined to believe there's just an issue with DDMsgReader.
I did notice that it seems after changing your newscan pointer configuration, the user may have to log off and back on again for it to take effect.
Re: msg_area.grp_list.sub_list scan_ptr
By: Digital Man to Accession on Sun Apr 28 2024 01:53 pm
User's msg-scan config and ptrs are stored in data/user/*.subs, so that's where I'd look while trying to diagnose this problem.
Should a message reader be reading the user's scan pointer directly from that file?
I wasn't aware of those files until just recently. I've always
been using scan_ptr from msg_area.grp_list.sub_list
I did notice that it seems after changing your newscan pointer
configuration, the user may have to log off and back on again for it to
take effect.
I don't think so. A user changing new-scan pointers is just changing the in-memory values (the *.subs files aren't changed until user log-off or the &W command is issued), the same in-memory values that are underpinning the "scan_ptr" JS properties.
Sysop: | Kurt Hamm |
---|---|
Location: | Columbia, SC |
Users: | 8 |
Nodes: | 20 (0 / 20) |
Uptime: | 134:31:33 |
Calls: | 2,804 |
Calls today: | 1 |
Files: | 64 |
Messages: | 854,503 |