• bbs.smb_curmsg in message

    From Nightfox@VERT/DIGDIST to Digital Man on Sat Mar 2 04:28:00 2013
    Hi DM,

    Using Synchronet's "Scan for messages to you", I've noticed that bbs.smb_curmsg seems to be relative to the messages to you rather than to the entire list of messages in the sub-board. For instance, when reading the first message to you, bbs.smb_curmsg is 0, regardless of whether that message is the first message in the sub-board or not. Is that the way it was intended? It would help if there was avariable that gives the message number that doesn't change when scanning for messages to you - is there such a variable?

    Currently, SlyEdit can insert the original author's initials to the front of quote lines. The issue is that when a user scans for messages to them and replies to the message, SlyEdit gets the wrong original author name because it uses bbs.smb_curmsg, which in that case will point to a different message than if the user was at the regular message read prompt.

    Nightfox

    ---
    þ Synchronet þ Digital Distortion BBS - digitaldistortionbbs.com
  • From Nightfox@VERT/DIGDIST to All on Sat May 4 04:29:00 2013
    This could be a somewhat obscure issue, but here goes.

    When replying to messages using Synchronet's "Scan for messages to you" feature, I've noticed that bbs.smb_curmsg seems to be relative to the messages to you rather than to the entire list of messages in the sub-board. For instance, when reading the first message to you, bbs.smb_curmsg is 0, regardless of whether that message is the first message in the sub-board or not.

    I'd like to be able to get the current message number/index, like smb_curmsg, that is always relative to the entire list of messages, even when replying to messages using the "Scan for messages to you" feature. Has anyone tried this and know if it's possible?

    Nightfox

    ---
    þ Synchronet þ Digital Distortion BBS - digitaldistortionbbs.com
  • From Digital Man@VERT to Nightfox on Mon May 6 21:26:00 2013
    Re: bbs.smb_curmsg in messages to you
    By: Nightfox to All on Sat May 04 2013 08:29 am

    This could be a somewhat obscure issue, but here goes.

    When replying to messages using Synchronet's "Scan for messages to you" feature, I've noticed that bbs.smb_curmsg seems to be relative to the messages to you rather than to the entire list of messages in the
    sub-board. For instance, when reading the first message to you, bbs.smb_curmsg is 0, regardless of whether that message is the first
    message in the sub-board or not.

    I'd like to be able to get the current message number/index, like smb_curmsg, that is always relative to the entire list of messages, even when replying to messages using the "Scan for messages to you" feature.
    Has anyone tried this and know if it's possible?

    Have you tried using bbs.msg_offset or bbs.msg_number? You should be able to access an absolute message number via JavaScript using either of these property
    values.

    digital man

    Synchronet "Real Fact" #27:
    Rob Swindell's first computer was a Commodore VIC-20 (1980).
    Norco, CA WX: 57.0øF, 74.0% humidity, 0 mph NNW wind, 0.04 inches rain/24hrs

    ---
    þ Synchronet þ Vertrauen þ Home of Synchronet þ [vert/cvs/bbs].synchro.net
  • From Nightfox@VERT/DIGDIST to Digital Man on Tue May 7 15:26:00 2013
    Re: bbs.smb_curmsg in messages to you
    By: Digital Man to Nightfox on Tue May 07 2013 01:26:19

    Have you tried using bbs.msg_offset or bbs.msg_number? You should be able to access an absolute message number via JavaScript using either of these property values.

    I'll try those.. Thanks.

    Nightfox

    ---
    þ Synchronet þ Digital Distortion BBS - digitaldistortionbbs.com
  • From Digital Man@VERT to Nightfox on Wed May 8 19:12:00 2013
    Re: bbs.smb_curmsg in messages to you
    By: Nightfox to Digital Man on Tue May 07 2013 07:26 pm

    Re: bbs.smb_curmsg in messages to you
    By: Digital Man to Nightfox on Tue May 07 2013 01:26:19

    Have you tried using bbs.msg_offset or bbs.msg_number? You should be able to access an absolute message number via JavaScript using either of these property values.

    I'll try those.. Thanks.

    The msg_offset is a 0-based offset into the index of all messages currently in the message area (sub-board). The msg_number is the 1-based unique number assigned to that message (and doesn't change when new messages are added or messages are deleted).

    digital man

    Synchronet "Real Fact" #42:
    Synchronet added Baja/PCMS support with v2.00a (1994).
    Norco, CA WX: 58.9øF, 63.0% humidity, 7 mph NW wind, 0.00 inches rain/24hrs

    ---
    þ Synchronet þ Vertrauen þ Home of Synchronet þ [vert/cvs/bbs].synchro.net
  • From Nightfox@VERT/DIGDIST to Digital Man on Fri May 10 16:50:00 2013
    Re: bbs.smb_curmsg in messages to you
    By: Digital Man to Nightfox on Wed May 08 2013 23:12:28

    The msg_offset is a 0-based offset into the index of all messages currently in the message area (sub-board). The msg_number is the 1-based unique number assigned to that message (and doesn't change when new messages are added or messages are deleted).

    I've started examining the values of bbs.msg_offset and bbs.msg_number (using a "development" version of SlyEdit on my BBS). When I reply to a message, using the message read prompt, it seems that both bbs.msg_offset and bbs.msg_number are always 0, no matter which message I'm replying to. It doesn't seem to matter which message group or sub-board I'm reading/replying in, either. Not sure if this is normal?

    Nightfox

    ---
    þ Synchronet þ Digital Distortion BBS - digitaldistortionbbs.com
  • From Digital Man@VERT to Nightfox on Sat May 11 20:18:00 2013
    Re: bbs.smb_curmsg in messages to you
    By: Nightfox to Digital Man on Fri May 10 2013 08:50 pm

    Re: bbs.smb_curmsg in messages to you
    By: Digital Man to Nightfox on Wed May 08 2013 23:12:28

    The msg_offset is a 0-based offset into the index of all messages currently in the message area (sub-board). The msg_number is the 1-based unique number assigned to that message (and doesn't change
    when new messages are added or messages are deleted).

    I've started examining the values of bbs.msg_offset and bbs.msg_number (using a "development" version of SlyEdit on my BBS). When I reply to a message, using the message read prompt, it seems that both bbs.msg_offset and bbs.msg_number are always 0, no matter which message I'm replying to.
    It doesn't seem to matter which message group or sub-board I'm reading/replying in, either. Not sure if this is normal?

    It's as designed apparently, but unexpected. I'm making a change now in CVS which will allow those properties to be used in more places than just the "show
    message header" function (which doesn't directly use JavaScript) - that was an oversight on my part.

    digital man

    Synchronet "Real Fact" #25:
    The Synchronet Web Server was written predominantly by Stephen Hurd (Deuce). Norco, CA WX: 70.2øF, 67.0% humidity, 1 mph NW wind, 0.00 inches rain/24hrs

    ---
    þ Synchronet þ Vertrauen þ Home of Synchronet þ [vert/cvs/bbs].synchro.net
  • From Nightfox@VERT/DIGDIST to Digital Man on Sun May 12 05:21:00 2013
    Re: bbs.smb_curmsg in messages to you
    By: Digital Man to Nightfox on Sun May 12 2013 00:18:20

    I've started examining the values of bbs.msg_offset and bbs.msg_number
    (using a "development" version of SlyEdit on my BBS). When I reply to
    a message, using the message read prompt, it seems that both
    bbs.msg_offset and bbs.msg_number are always 0, no matter which
    message I'm replying to. It doesn't seem to matter which message group
    or sub-board I'm reading/replying in, either. Not sure if this is
    normal?

    It's as designed apparently, but unexpected. I'm making a change now in CVS which will allow those properties to be used in more places than just the "show message header" function (which doesn't directly use JavaScript) - that was an oversight on my part.

    I updated to this morning's build, but I'm still seeing some odd behavior with bbs.msg_offset. I first read a few messages (using the message read prompt) and bbs.msg_offset was 0 for each message. Then I tried the "Scan for messages to you" in a different sub-board, and bbs.msg_offset had a non-zero value (which I imagine was correct for that situation). Then I came back to the first sub-board I was in and read messages again with the Message read prompt, and bbs.msg_offset was 2. The message I was reading was the last message in the sub-board, so that doesn't seem right.

    Nightfox

    ---
    þ Synchronet þ Digital Distortion BBS - digitaldistortionbbs.com
  • From Digital Man@VERT to Nightfox on Sun May 12 09:44:00 2013
    Re: bbs.smb_curmsg in messages to you
    By: Nightfox to Digital Man on Sun May 12 2013 09:21 am

    Re: bbs.smb_curmsg in messages to you
    By: Digital Man to Nightfox on Sun May 12 2013 00:18:20

    I've started examining the values of bbs.msg_offset and bbs.msg_number
    (using a "development" version of SlyEdit on my BBS). When I reply to
    a message, using the message read prompt, it seems that both
    bbs.msg_offset and bbs.msg_number are always 0, no matter which
    message I'm replying to. It doesn't seem to matter which message group
    or sub-board I'm reading/replying in, either. Not sure if this is
    normal?

    It's as designed apparently, but unexpected. I'm making a change now
    in CVS which will allow those properties to be used in more places
    than just the "show message header" function (which doesn't directly use JavaScript) - that was an oversight on my part.

    I updated to this morning's build, but I'm still seeing some odd behavior with bbs.msg_offset. I first read a few messages (using the message read prompt) and bbs.msg_offset was 0 for each message. Then I tried the "Scan for messages to you" in a different sub-board, and bbs.msg_offset had a non-zero value (which I imagine was correct for that situation). Then I came back to the first sub-board I was in and read messages again with the Message read prompt, and bbs.msg_offset was 2. The message I was reading was the last message in the sub-board, so that doesn't seem right.

    What about the bbs.msg_number property? It behaving as you would expect?

    digital man

    Synchronet "Real Fact" #1:
    Synchronet version 2 for DOS and OS/2 was released to the public domain in 1997.
    Norco, CA WX: 76.7øF, 50.0% humidity, 0 mph ENE wind, 0.00 inches rain/24hrs

    ---
    þ Synchronet þ Vertrauen þ Home of Synchronet þ [vert/cvs/bbs].synchro.net
  • From Nightfox@VERT/DIGDIST to Digital Man on Sun May 12 15:30:00 2013
    Re: bbs.smb_curmsg in messages to you
    By: Digital Man to Nightfox on Sun May 12 2013 13:44:16

    What about the bbs.msg_number property? It behaving as you would expect?

    I haven't tried using bbs.msg_number yet, but so far it seems to be behaving as I would expect. But I'm a little hesitant to use it for MsgBase.get_msg_header(), since it doesn't change when new messages are added or deleted. SlyEdit (currently) uses message indexes, since I've always thought that was the most reliable way to reference a message. I remember a discussion a few months ago that I think involved using bbs.msg_number in a calculation to come up with an absolute message number, which wouldn't necessarily be for a message that exists. Can bbs.msg_number be used directly in MsgBase.get_msg_header (with the by_offset parameter as false)?

    Nightfox

    ---
    þ Synchronet þ Digital Distortion BBS - digitaldistortionbbs.com
  • From Digital Man@VERT to Nightfox on Tue May 14 13:53:00 2013
    Re: bbs.smb_curmsg in messages to you
    By: Nightfox to Digital Man on Sun May 12 2013 07:30 pm

    Re: bbs.smb_curmsg in messages to you
    By: Digital Man to Nightfox on Sun May 12 2013 13:44:16

    What about the bbs.msg_number property? It behaving as you would expect?

    I haven't tried using bbs.msg_number yet, but so far it seems to be
    behaving as I would expect. But I'm a little hesitant to use it for MsgBase.get_msg_header(), since it doesn't change when new messages are added or deleted. SlyEdit (currently) uses message indexes, since I've always thought that was the most reliable way to reference a message.

    No, it's actually the opposite. Think of the message number like a "serial number" for the message. It won't be reused and never expires.

    I
    remember a discussion a few months ago that I think involved using bbs.msg_number in a calculation to come up with an absolute message number, which wouldn't necessarily be for a message that exists.

    That was an unrelated subject, but yes, there can be "wholes" in the message numbers (where a message once existed but was deleted).

    Can
    bbs.msg_number be used directly in MsgBase.get_msg_header (with the by_offset parameter as false)?

    Yes, exactly.

    The bbs.msg_offset property will probably just be removed since it doesn't provide any benefit.

    digital man

    Synchronet "Real Fact" #66:
    SEXYZ is as a 32-bit replacement for [F]DSZ, CE-XYZ and other protocol drivers. Norco, CA WX: 78.3øF, 38.0% humidity, 13 mph NNW wind, 0.00 inches rain/24hrs

    ---
    þ Synchronet þ Vertrauen þ Home of Synchronet þ [vert/cvs/bbs].synchro.net
  • From Nightfox@VERT/DIGDIST to Digital Man on Tue May 14 16:19:00 2013
    Re: bbs.smb_curmsg in messages to you
    By: Digital Man to Nightfox on Tue May 14 2013 17:53:28

    Can
    bbs.msg_number be used directly in MsgBase.get_msg_header (with the
    by_offset parameter as false)?

    Yes, exactly.

    The bbs.msg_offset property will probably just be removed since it doesn't provide any benefit.

    I've updated my development SlyEdit to use bbs.msg_number instead of bbs.msg_offset, and it indeed seems to get the correct message header even in cases where bbs.msg_offset didn't (such as when replying to messages during scanning for new messages to you). I'll release a new version of SlyEdit with this change.

    Nightfox

    ---
    þ Synchronet þ Digital Distortion BBS - digitaldistortionbbs.com
  • From Digital Man@VERT to Nightfox on Wed May 15 12:46:00 2013
    Re: bbs.smb_curmsg in messages to you
    By: Nightfox to Digital Man on Tue May 14 2013 08:19 pm

    Re: bbs.smb_curmsg in messages to you
    By: Digital Man to Nightfox on Tue May 14 2013 17:53:28

    Can
    bbs.msg_number be used directly in MsgBase.get_msg_header (with the
    by_offset parameter as false)?

    Yes, exactly.

    The bbs.msg_offset property will probably just be removed since it doesn't provide any benefit.

    I've updated my development SlyEdit to use bbs.msg_number instead of bbs.msg_offset, and it indeed seems to get the correct message header even in cases where bbs.msg_offset didn't (such as when replying to messages during scanning for new messages to you). I'll release a new version of SlyEdit with this change.

    But you do know that bbs.msg_number property doesn't work with any version of Synchronet before the current development builds, right? Are you handling that possibility (backwards compatibility) in your editor?

    digital man

    Synchronet "Real Fact" #7:
    Synchronet was originally intended as a replacement for WWIV BBS software. Norco, CA WX: 74.7øF, 54.0% humidity, 17 mph WNW wind, 0.00 inches rain/24hrs

    ---
    þ Synchronet þ Vertrauen þ Home of Synchronet þ [vert/cvs/bbs].synchro.net
  • From Nightfox@VERT/DIGDIST to Digital Man on Wed May 15 14:01:00 2013
    I've updated my development SlyEdit to use bbs.msg_number instead of bbs.msg_offset, and it indeed seems to get the correct message header even in cases where bbs.msg_offset didn't (such as when replying to messages during scanning for new messages to you). I'll release a new version of SlyEdit with this change.

    But you do know that bbs.msg_number property doesn't work with any version of Synchronet before the current development builds, right? Are you
    handling that possibility (backwards compatibility) in your editor?

    But the Synchronet JavaScript documentation says bbs.msg_number was introduced in version 3.10:
    http://www.synchro.net/docs/jsobjs.html#bbs_properties

    Is that not the case?

    Nightfox

    ---
    þ Synchronet þ Digital Distortion BBS - digitaldistortionbbs.com
  • From Digital Man@VERT to Nightfox on Wed May 15 20:32:00 2013
    Re: bbs.smb_curmsg in messages to you
    By: Nightfox to Digital Man on Wed May 15 2013 06:01 pm

    I've updated my development SlyEdit to use bbs.msg_number instead of bbs.msg_offset, and it indeed seems to get the correct message header even in cases where bbs.msg_offset didn't (such as when replying to messages during scanning for new messages to you). I'll release a
    new version of SlyEdit with this change.

    But you do know that bbs.msg_number property doesn't work with any version of Synchronet before the current development builds, right? Are you handling that possibility (backwards compatibility) in your editor?

    But the Synchronet JavaScript documentation says bbs.msg_number was introduced in version 3.10: http://www.synchro.net/docs/jsobjs.html#bbs_properties

    Is that not the case?

    It was, but as you reported, it didn't work. I fixed this on May 12th: http://cvs.synchro.net/commitlog.ssjs#29419
    In all versions prior to that, it would contain 0 unless the script was running
    *while* the message was being displayed (which is unlikely).

    digital man

    Synchronet "Real Fact" #13:
    SBBSecho was originally written by Allen Christiansen (King Drafus) in 1994. Norco, CA WX: 56.5øF, 88.0% humidity, 2 mph WNW wind, 0.00 inches rain/24hrs

    ---
    þ Synchronet þ Vertrauen þ Home of Synchronet þ [vert/cvs/bbs].synchro.net
  • From Nightfox@VERT/DIGDIST to Digital Man on Thu May 16 03:44:00 2013
    Re: bbs.smb_curmsg in messages to you
    By: Digital Man to Nightfox on Thu May 16 2013 00:32:01

    But the Synchronet JavaScript documentation says bbs.msg_number was
    introduced in version 3.10:

    It was, but as you reported, it didn't work. I fixed this on May 12th: http://cvs.synchro.net/commitlog.ssjs#29419
    In all versions prior to that, it would contain 0 unless the script was running *while* the message was being displayed (which is unlikely).

    That's right.. I somehow had forgotten that detail when I posted my last question. I'll have SlyEdit use its previous behavior for earlier versions for backward-compatibility.

    Nightfox

    ---
    þ Synchronet þ Digital Distortion BBS - digitaldistortionbbs.com