• last_read and scan_ptr values

    From Nightfox@VERT/DIGDIST to Digital Man on Wednesday, March 25, 2015 21:39:55
    Hi DM,

    In the msg_area.grp_list.sub_list array, when should the scan_ptr and last_read values be updated for a sub-board? For instance, when simply reading messages (i.e., not doing a newscan), would both of those be updated or would only last_read be updated? And conversely, when reading messages during a newscan, would only the scan_ptr value be updated, or would both scan_ptr and last_read be updated?

    Also, it looks like there's a typo in the Synchronet JS documentation at http://www.synchro.net/docs/jsobjs.html - Under the "msg_area.grp_list.sub_list array" section, the last row in the table has "lead_read" - I believe that should be "last_read"?

    Nightfox

    ---
    ■ Synchronet ■ Digital Distortion BBS - digitaldistortionbbs.com
  • From Digital Man@VERT to Nightfox on Thursday, March 26, 2015 21:55:01
    Re: last_read and scan_ptr values
    By: Nightfox to Digital Man on Wed Mar 25 2015 09:39 pm

    Hi DM,

    In the msg_area.grp_list.sub_list array, when should the scan_ptr and last_read values be updated for a sub-board? For instance, when simply reading messages (i.e., not doing a newscan), would both of those be updated or would only last_read be updated? And conversely, when reading messages during a newscan, would only the scan_ptr value be updated, or would both scan_ptr and last_read be updated?

    Any time the currently displayed message number is greater than the current scan_ptr, the scan_ptr should be updated. For every message displayed, the last_read should be updated. These apply regardless of the method of message reading/scanning.

    Also, it looks like there's a typo in the Synchronet JS documentation at http://www.synchro.net/docs/jsobjs.html - Under the "msg_area.grp_list.sub_list array" section, the last row in the table has "lead_read" - I believe that should be "last_read"?

    Yeah, that was fixed quite a while ago but the jsobjs.html hasn't be re-generated since then. Thanks,

    digital man

    Synchronet "Real Fact" #3:
    Synchronet version 3 is written mostly in C, with some C++, x86 ASM, and Pascal.
    Norco, CA WX: 75.0°F, 26.0% humidity, 1 mph SE wind, 0.00 inches rain/24hrs

    ---
    ■ Synchronet ■ Vertrauen ■ Home of Synchronet ■ [vert/cvs/bbs].synchro.net
  • From Nightfox@VERT/DIGDIST to Digital Man on Friday, March 27, 2015 07:33:30
    Re: last_read and scan_ptr values
    By: Digital Man to Nightfox on Thu Mar 26 2015 21:55:01

    Any time the currently displayed message number is greater than the current scan_ptr, the scan_ptr should be updated. For every message displayed, the last_read should be updated. These apply regardless of the method of message reading/scanning.

    OK, thanks.

    Nightfox

    ---
    ■ Synchronet ■ Digital Distortion BBS - digitaldistortionbbs.com
  • From Nightfox@VERT/DIGDIST to Digital Man on Friday, March 27, 2015 22:49:47
    Re: last_read and scan_ptr values
    By: Digital Man to Nightfox on Thu Mar 26 2015 21:55:01

    If a new message is posted in a sub-board and that's the only message in the sub-board, it seems that scan_ptr and last_read would point to that message (is that correct?). If the currently logged-in user reads that message, then scan_ptr and last_read would remain unchanged since that's the only message in the sub-board. During a newscan, how can a JavaScript script determine whether the user has read that message (even if it wasn't written to the user - so the MSG_READ attribute wouldn't be set)?

    Nightfox

    ---
    ■ Synchronet ■ Digital Distortion BBS - digitaldistortionbbs.com
  • From Nightfox@VERT/DIGDIST to Digital Man on Saturday, March 28, 2015 09:17:20
    Re: last_read and scan_ptr values
    By: Nightfox to Digital Man on Fri Mar 27 2015 22:49:47

    If a new message is posted in a sub-board and that's the only message in the sub-board, it seems that scan_ptr and last_read would point to that message (is that correct?). If the currently logged-in user reads that message, then scan_ptr and last_read would remain unchanged since that's the only message in the sub-board. During a newscan, how can a JavaScript script determine whether the user has read that message (even if it wasn't written to the user - so the MSG_READ attribute wouldn't be set)?

    I've done a little bit more testing this morning, and now I'm wondering if 0 is a meaningful value for scan_ptr? If I post a new message in an empty sub-board, it seems that the scan_ptr value for that sub-board is 0 until I read the message I posted. A related question is, will a message number (the 'number' property in a message header) ever be 0?

    Nightfox

    ---
    ■ Synchronet ■ Digital Distortion BBS - digitaldistortionbbs.com
  • From Digital Man@VERT to Nightfox on Sunday, March 29, 2015 23:45:10
    Re: last_read and scan_ptr values
    By: Nightfox to Digital Man on Fri Mar 27 2015 10:49 pm

    Re: last_read and scan_ptr values
    By: Digital Man to Nightfox on Thu Mar 26 2015 21:55:01

    If a new message is posted in a sub-board and that's the only message in the sub-board, it seems that scan_ptr and last_read would point to that message (is that correct?).

    Posting a message does not modify either the user's scan_ptr or last_read values. Only reading messages modifies those values.

    If the currently logged-in user reads that message,
    then scan_ptr and last_read would remain unchanged since that's the only message in the sub-board.

    No, if the user has never read messages on a sub-board, then their scan_ptr and
    last_read values would be 0 (no message).

    During a newscan, how can a JavaScript script
    determine whether the user has read that message (even if it wasn't written to the user - so the MSG_READ attribute wouldn't be set)?

    The MSG_READ attribute should be set anytime a user reads a message addressed to them and the attribute is not already set. You don't need to check any pointers for that. You can see how Synchronet checks/sets the MSG_READ attribute by searching for MSG_READ in: http://cvs.synchro.net/cgi-bin/viewcvs.cgi/src/sbbs3/readmsgs.cpp

    digital man

    Synchronet "Real Fact" #65:
    Synchronet was conceived of and mostly developed in southern California.
    Norco, CA WX: 61.1°F, 81.0% humidity, 2 mph SSE wind, 0.00 inches rain/24hrs

    ---
    ■ Synchronet ■ Vertrauen ■ Home of Synchronet ■ [vert/cvs/bbs].synchro.net
  • From Digital Man@VERT to Nightfox on Sunday, March 29, 2015 23:47:08
    Re: last_read and scan_ptr values
    By: Nightfox to Digital Man on Sat Mar 28 2015 09:17 am

    Re: last_read and scan_ptr values
    By: Nightfox to Digital Man on Fri Mar 27 2015 22:49:47

    If a new message is posted in a sub-board and that's the only message in the sub-board, it seems that scan_ptr and last_read would point to that message (is that correct?). If the currently logged-in user reads that message, then scan_ptr and last_read would remain unchanged since that's the only message in the sub-board. During a newscan, how can a JavaScript script determine whether the user has read that message (even if it wasn't written to the user - so the MSG_READ attribute wouldn't be set)?

    I've done a little bit more testing this morning, and now I'm wondering if 0 is a meaningful value for scan_ptr? If I post a new message in an empty sub-board, it seems that the scan_ptr value for that sub-board is 0 until I read the message I posted.

    Correct. Posting a message does not change any message pointers and the initial
    pointer value will be 0 (no message).

    A related question is, will a message number
    (the 'number' property in a message header) ever be 0?

    No. 0 is a special value indicating "no message". You can read about SMB message numbers here: http://synchro.net/docs/smb.html#Index File (*.SID)

    digital man

    Synchronet "Real Fact" #28:
    Rob Swindell first called BBSes (at 300bps) with an Apple II computer in 1982. Norco, CA WX: 61.1°F, 81.0% humidity, 2 mph SSE wind, 0.00 inches rain/24hrs

    ---
    ■ Synchronet ■ Vertrauen ■ Home of Synchronet ■ [vert/cvs/bbs].synchro.net
  • From Nightfox@VERT/DIGDIST to Digital Man on Monday, March 30, 2015 10:10:26
    If a new message is posted in a sub-board and that's the only message in the sub-board, it seems that scan_ptr and last_read would point to that message (is that correct?). If the
    currently
    logged-in user reads that message, then scan_ptr and last_read would remain unchanged since that's the only message in the sub-board. During a newscan, how can a JavaScript script
    determine
    whether the user has read that message (even if it wasn't
    written
    to the user - so the MSG_READ attribute wouldn't be set)?

    I've done a little bit more testing this morning, and now I'm
    wondering
    if 0 is a meaningful value for scan_ptr? If I post a new message in
    an
    empty sub-board, it seems that the scan_ptr value for that sub-board
    is
    0 until I read the message I posted.

    Correct. Posting a message does not change any message pointers and the initial pointer value will be 0 (no message).

    A related question is, will a message number
    (the 'number' property in a message header) ever be 0?

    No. 0 is a special value indicating "no message". You can read about SMB message numbers here: http://synchro.net/docs/smb.html#Index File
    (*.SID)

    Thanks - This confirms what I was wondering.

    I understand that posting won't modify those pointers; maybe my question could have been worded better in regards to that - I was referring to doing a
    newscan after a new message had been posted by another user (and on my BBS, I was testing a situation where a sub-board only has one message in it).

    Nightfox

    ---
    ■ Synchronet ■ Digital Distortion BBS - digitaldistortionbbs.com
  • From Ragnarok@VERT/DOCKSUD to Digital Man on Tuesday, March 31, 2015 00:28:32
    El 27/03/15 a las 01:55, "Digital Man" escibiˇ:


    Yeah, that was fixed quite a while ago but the jsobjs.html hasn't be re-generated since then. Thanks,

    digital man
    I don't remember exactly now why, but i know that i could not regenerate jsobs.html from source code. I had a wrong html output:

    http://bbs.docksud.com.ar/tmp/jsobjs.html

    ---
    ■ Synchronet ■ Dock Sud BBS TLD 24 HS - http://www.docksud.com.ar - telnet://bbs.docksud.com.ar