• src/sbbs3/js_msgbase.c

    From rswindell@VERT to CVS commit on Thu Nov 26 07:56:06 2015
    src/sbbs3 js_msgbase.c 1.192 1.193
    Update of /cvsroot/sbbs/src/sbbs3
    In directory cvs:/tmp/cvs-serv22495

    Modified Files:
    js_msgbase.c
    Log Message:
    Make the SMB plain-text only feature available to users of the MsgBase.get_msg_body() method: added an additional boolean argument (following the 'include_tails' argument), which defaults to false (disabled). Pass true for this argument to enable this feature. Yes, JS-authors could do this parsing easily via JS, but I figure so long as this feature is in the SMBLIB, might as well expose it to JS for consistency (e.g. in 3rd party message reader mods).


    ---
    ■ Synchronet ■ Vertrauen ■ Home of Synchronet ■ telnet://vert.synchro.net
  • From rswindell@VERT to CVS commit on Sat Nov 12 07:23:06 2016
    src/sbbs3 js_msgbase.c 1.194 1.195
    Update of /cvsroot/sbbs/src/sbbs3
    In directory cvs:/tmp/cvs-serv15012

    Modified Files:
    js_msgbase.c
    Log Message:
    MsgBase methods now exclude vote messages by default:
    - get_msg_index()
    - get_msg_header()
    - get_all_msg_headers()
    these functions all accept a new (optonal, last) bool argument "include_votes" which defaults to false. So if for some reason, you want to load votes, just pass an additional 'true' argument.
    ToDo: polls and vote tallying.
    At least for now, existing JS stuff that uses the MsgBase object won't get messed up by the new voting messages.


    ---
    ■ Synchronet ■ Vertrauen ■ Home of Synchronet ■ telnet://vert.synchro.net
  • From rswindell@VERT to CVS commit on Sun Nov 13 03:06:31 2016
    src/sbbs3 js_msgbase.c 1.195 1.196
    Update of /cvsroot/sbbs/src/sbbs3
    In directory cvs:/tmp/cvs-serv15152

    Modified Files:
    js_msgbase.c
    Log Message:
    Add new MsgBase method: vote_msg(). it takes a message header object
    (like save_msg), except you only need a few properties, in order of importarnce:
    attr: you need to have this set to MSG_UPVOTE, MSG_DOWNVOTE, or MSG_VOTE thread_back or reply_id: either of these must be set to indicate msg to vote on from: name of voter
    from_net_type and from_net_addr: if applicable


    ---
    ■ Synchronet ■ Vertrauen ■ Home of Synchronet ■ telnet://vert.synchro.net
  • From rswindell@VERT to CVS commit on Sun Nov 13 08:37:11 2016
    src/sbbs3 js_msgbase.c 1.196 1.197
    Update of /cvsroot/sbbs/src/sbbs3
    In directory cvs:/tmp/cvs-serv22162

    Modified Files:
    js_msgbase.c
    Log Message:
    MsgBase.get_all_msg_headers() now returns the vote totals for each message
    (new header properties: upvotes and downvotes), regardless of the "include_votes" argument value (default: false).
    get_all_msg_headers() reads the entire index already, so there's really no performance penalty unless there are actual votes (and even then, very low). The MsgBase.get_msg_header() function will *not* return these vote totals since that would incur a pretty substatial performance hit on that function.


    ---
    ■ Synchronet ■ Vertrauen ■ Home of Synchronet ■ telnet://vert.synchro.net
  • From rswindell@VERT to CVS commit on Wed Nov 16 02:45:53 2016
    src/sbbs3 js_msgbase.c 1.198 1.199
    Update of /cvsroot/sbbs/src/sbbs3
    In directory cvs:/tmp/cvs-serv23378

    Modified Files:
    js_msgbase.c
    Log Message:
    Updated for smblib changes (constants and struct changes).
    add_poll() method now sets the when_written/imported time stamps and zones
    as needed and configured.


    ---
    ■ Synchronet ■ Vertrauen ■ Home of Synchronet ■ telnet://vert.synchro.net
  • From rswindell@VERT to CVS commit on Mon Nov 21 01:20:14 2016
    src/sbbs3 js_msgbase.c 1.200 1.201
    Update of /cvsroot/sbbs/src/sbbs3
    In directory cvs:/tmp/cvs-serv6370

    Modified Files:
    js_msgbase.c
    Log Message:
    Include SMB_POLL_ANSWER hfields in the message header "field_list" array.


    ---
    ■ Synchronet ■ Vertrauen ■ Home of Synchronet ■ telnet://vert.synchro.net
  • From rswindell@VERT to CVS commit on Mon Nov 21 02:49:59 2016
    src/sbbs3 js_msgbase.c 1.201 1.202
    Update of /cvsroot/sbbs/src/sbbs3
    In directory cvs:/tmp/cvs-serv8496

    Modified Files:
    js_msgbase.c
    Log Message:
    Add the "votes" header property.
    On polls, this is the maximum number of votes per ballot in response to this poll (0 is the same as 1).
    On ballots, this is the bit-field of votes submitted by the user (e.g. bit 0 set is a vote for answer 1, bit 1 for answer 2, etc.).
    For normal messages, this field has no current use.


    ---
    ■ Synchronet ■ Vertrauen ■ Home of Synchronet ■ telnet://vert.synchro.net
  • From rswindell@VERT to CVS commit on Mon Nov 21 05:58:17 2016
    src/sbbs3 js_msgbase.c 1.202 1.203
    Update of /cvsroot/sbbs/src/sbbs3
    In directory cvs:/tmp/cvs-serv23020

    Modified Files:
    js_msgbase.c
    Log Message:
    Handle poll-closures correctly (don't treat as votes in get_msg_index and get_all_msg_headers).
    Added new method: get_user_votes(msg number, user name or alias)
    The user name or alias must match the posting configuration on the local
    system (i.e. if set for real names, pass the user's real name instead of alias).
    This function returns 0 for no votes on the reference message, 1 for an up-vote, 2 for a down-vote or in the case of a poll-response, a bit-field of votes.


    ---
    ■ Synchronet ■ Vertrauen ■ Home of Synchronet ■ telnet://vert.synchro.net
  • From rswindell@VERT to CVS commit on Tue Nov 22 03:41:01 2016
    src/sbbs3 js_msgbase.c 1.204 1.205
    Update of /cvsroot/sbbs/src/sbbs3
    In directory cvs:/tmp/cvs-serv9157

    Modified Files:
    js_msgbase.c
    Log Message:
    Fix how_user_voted() method, was always returning 0. I wasn't converting the "name" argument to a char* correctly.


    ---
    ■ Synchronet ■ Vertrauen ■ Home of Synchronet ■ telnet://vert.synchro.net
  • From rswindell@VERT to CVS commit on Sat Aug 19 01:47:06 2017
    src/sbbs3 js_msgbase.c 1.206 1.207
    Update of /cvsroot/sbbs/src/sbbs3
    In directory cvs:/home/rswindell/sbbs/src/sbbs3

    Modified Files:
    js_msgbase.c
    Log Message:
    Create MsgBase.close_poll() method - used to close an existing poll
    the arguments are: MessageNumber, UserNameOrAlias

    The MessageNumber is the message number for the close to be polled.
    The UserNameOrAlias should be the currentl authenticated user and must
    match the pollster (sender) of the poll for the closure to succeed.



    ---
    ■ Synchronet ■ Vertrauen ■ Home of Synchronet ■ [vert/cvs/bbs].synchro.net
  • From rswindell@VERT to CVS commit on Wed Nov 1 19:41:06 2017
    src/sbbs3 js_msgbase.c 1.207 1.208
    Update of /cvsroot/sbbs/src/sbbs3
    In directory cvs:/tmp/cvs-serv1479

    Modified Files:
    js_msgbase.c
    Log Message:
    Hopefully fix issue with converting auxattr with bit 31 set to/from JS value: Poll with results "closed" (only visible to pollster until the poll is closed) have bit 31 set in the auxattr message header field. Reportedly (by Nightfox) this causes Error: can't convert 2147483648 to an integer when attempting
    to use this message in JS.
    I could'vd sworn I've solved this problem before, but maybe that was with
    JS-C v1.5 - anyway, first convert to double using JS_ValueToNumber and then typecast to uint32.
    We probably will need to do something similar with the time values in year
    2038 (holding my breath).


    ---
    ■ Synchronet ■ Vertrauen ■ Home of Synchronet ■ [vert/cvs/bbs].synchro.net
  • From Argon@VERT/STARFLT to rswindell on Fri Nov 3 02:35:18 2017
    Re: src/sbbs3/js_msgbase.c
    By: rswindell to CVS commit on Wed Nov 01 2017 03:41 pm

    We probably will need to do something similar with the time values in year 2038 (holding my breath).

    And I'll be 75 then... lol.

    I'll be able to say, "I've been BBSing for 50 years." in 2038.

    Darryl

    ---
    ■ Synchronet ■ StarFlight BBS - bbs.starflightbbs.com
  • From rswindell@VERT to CVS commit on Tue Nov 21 23:44:15 2017
    src/sbbs3 js_msgbase.c 1.209 1.210
    Update of /cvsroot/sbbs/src/sbbs3
    In directory cvs:/home/rswindell/sbbs/src/sbbs3

    Modified Files:
    js_msgbase.c
    Log Message:
    Fixed bug in JS msgbase.save_msg(), when multiple recipients were
    passed (as an array), the message's data blocks would be allocated with a refcount of 1, as though only one message header referenced the data. This
    is really only an issue with bulkmail/multiple-recipient email and when the first message was deleted, the remaining (headers) would point to free
    data blocks which could and eventually would be overwritten by another message's data (body text). chksmb would only catch the problem when the refcount reached 0 but there was still one or more message headers pointing
    at the data.



    ---
    ■ Synchronet ■ Vertrauen ■ Home of Synchronet ■ [vert/cvs/bbs].synchro.net
  • From rswindell@VERT to CVS commit on Mon Nov 27 19:34:53 2017
    src/sbbs3 js_msgbase.c 1.211 1.212
    Update of /cvsroot/sbbs/src/sbbs3
    In directory cvs:/tmp/cvs-serv8361

    Modified Files:
    js_msgbase.c
    Log Message:
    Fix a bug in the get_msg_header() method introduced in rev 1.195 (12-Nov-2016): The 'expand_fields' argument wasn't be parsed correctly and defaults to 'true', so any script that modifies a message header could be writing-back expandeed header fields which may sometimes fail depending on how much the total header size expanded.
    Enhancement: the put_msg_header() method will now fail with an exception if a script tries to write-back a message header that was read with expanded fields. This should help to avoid potential message base corruption through a script bug.


    ---
    ■ Synchronet ■ Vertrauen ■ Home of Synchronet ■ [vert/cvs/bbs].synchro.net
  • From rswindell@VERT to CVS commit on Mon Nov 27 22:00:26 2017
    src/sbbs3 js_msgbase.c 1.212 1.213
    Update of /cvsroot/sbbs/src/sbbs3
    In directory cvs:/tmp/cvs-serv23177

    Modified Files:
    js_msgbase.c
    Log Message:
    Fix a potential null pointer dereference in the last commit.


    ---
    ■ Synchronet ■ Vertrauen ■ Home of Synchronet ■ [vert/cvs/bbs].synchro.net
  • From rswindell@VERT to CVS commit on Fri Dec 1 01:52:08 2017
    src/sbbs3 js_msgbase.c 1.213 1.214
    Update of /cvsroot/sbbs/src/sbbs3
    In directory cvs:/home/rswindell/sbbs/src/sbbs3

    Modified Files:
    js_msgbase.c
    Log Message:
    Fix likely cause of crash in MsgBase.get_msg_header(String id):
    incrementing the argv index in a call to JSSTRING_TO_MSTRING causes the
    index to be incremented twice!



    ---
    ■ Synchronet ■ Vertrauen ■ Home of Synchronet ■ [vert/cvs/bbs].synchro.net
  • From rswindell@VERT to CVS commit on Sat Jan 20 01:14:56 2018
    src/sbbs3 js_msgbase.c 1.214 1.215
    Update of /cvsroot/sbbs/src/sbbs3
    In directory cvs:/tmp/cvs-serv7266

    Modified Files:
    js_msgbase.c
    Log Message:
    Added missing mention of msg hdr.can_read property



    ---
    ■ Synchronet ■ Vertrauen ■ Home of Synchronet ■ [vert/cvs/bbs].synchro.net
  • From rswindell@VERT to CVS commit on Thu Feb 22 07:29:28 2018
    src/sbbs3 js_msgbase.c 1.217 1.218
    Update of /cvsroot/sbbs/src/sbbs3
    In directory cvs:/tmp/cvs-serv10027

    Modified Files:
    js_msgbase.c
    Log Message:
    Fix double-free bug introduced in js_remove_msg() in previous commit
    (Coverity clean-up) - apparently this function was already erroneously freeing the object private pointer (p) and I copy/pasted that error into more places.


    ---
    ■ Synchronet ■ Vertrauen ■ Home of Synchronet ■ [vert/cvs/bbs].synchro.net
  • From rswindell@VERT to CVS commit on Tue May 15 19:41:59 2018
    src/sbbs3 js_msgbase.c 1.219 1.220
    Update of /cvsroot/sbbs/src/sbbs3
    In directory cvs:/tmp/cvs-serv17644

    Modified Files:
    js_msgbase.c
    Log Message:
    Fix get_msg_header() problem reported by Bill McGarrity:
    "expand fields" could be misinterpretted (e.g. as 'false') if less than 3
    args were passed to the function. Apparently you can NOT assume that argv[argc] is undefined and would fail a JSVAL_IS_BOOLEAN test. In the reported problem, MsgBase.get_msg_header() was being called with 2 arguments (from newslink.js) and the if(JSVAL_IS_BOOLEAN(argv[n])) test, when n was 2, would eval to true and then argv[n] evalulated as false, which would cause a message with no message ID to not have one dynamically created, which would then cause the message to fail to post to an NNTP server due to malformed Message-ID (a missing message "id" property would end up being included in the newsgropu article header as "Message-ID: undefined").

    get_msg_index() had a similar potential issue, also fixed.


    ---
    ■ Synchronet ■ Vertrauen ■ Home of Synchronet ■ [vert/cvs/bbs].synchro.net
  • From rswindell@VERT to CVS commit on Mon Jul 16 02:42:08 2018
    src/sbbs3 js_msgbase.c 1.220 1.221
    Update of /cvsroot/sbbs/src/sbbs3
    In directory cvs:/tmp/cvs-serv8385

    Modified Files:
    js_msgbase.c
    Log Message:
    Rename this private_t.status to private_t.smb_result, to avoid confusion
    with smb_t.status.



    ---
    ■ Synchronet ■ Vertrauen ■ Home of Synchronet ■ [vert/cvs/bbs].synchro.net
  • From rswindell@VERT to CVS commit on Wed Oct 3 05:13:19 2018
    src/sbbs3 js_msgbase.c 1.222 1.223
    Update of /cvsroot/sbbs/src/sbbs3
    In directory cvs:/tmp/cvs-serv25520

    Modified Files:
    js_msgbase.c
    Log Message:
    Added "tags" to the message header property fields populated when getting
    a message header.
    Added "tags" and "summary" (previously missing) to the property fields
    parsed when adding/writing a message header. This parse code is getting particulary copy/pasta and should be converted to a table-driven loop
    reusing the same logic.



    ---
    ■ Synchronet ■ Vertrauen ■ Home of Synchronet ■ [vert/cvs/bbs].synchro.net
  • From rswindell@VERT to CVS commit on Mon Jan 21 07:10:32 2019
    src/sbbs3 js_msgbase.c 1.223 1.224
    Update of /cvsroot/sbbs/src/sbbs3
    In directory cvs:/tmp/cvs-serv20155

    Modified Files:
    js_msgbase.c
    Log Message:
    Attempt to clarify all this MsgBase.get...(by_offset, number_or_offset_or_id_header)
    confusion: You should not pass both a message number *and* a message header to the
    retrieval methods that support referring to a message by either (number/offset, id
    or header).



    ---
    ■ Synchronet ■ Vertrauen ■ Home of Synchronet ■ [vert/cvs/bbs].synchro.net
  • From rswindell@VERT to CVS commit on Tue Jan 22 00:18:04 2019
    src/sbbs3 js_msgbase.c 1.224 1.225
    Update of /cvsroot/sbbs/src/sbbs3
    In directory cvs:/tmp/cvs-serv16237

    Modified Files:
    js_msgbase.c
    Log Message:
    Beautification/typo of MsgBase methods by_offset blurb.



    ---
    ■ Synchronet ■ Vertrauen ■ Home of Synchronet ■ [vert/cvs/bbs].synchro.net
  • From rswindell@VERT to CVS commit on Sat Feb 16 08:38:30 2019
    src/sbbs3 js_msgbase.c 1.225 1.226
    Update of /cvsroot/sbbs/src/sbbs3
    In directory cvs:/tmp/cvs-serv24228

    Modified Files:
    js_msgbase.c
    Log Message:
    MsgBase.get_all_msg_headers() performance improvement:
    read the entire index file in a single read operation


    ---
    ■ Synchronet ■ Vertrauen ■ Home of Synchronet ■ [vert/cvs/bbs].synchro.net
  • From rswindell@VERT to CVS commit on Mon Feb 18 00:14:48 2019
    src/sbbs3 js_msgbase.c 1.226 1.227
    Update of /cvsroot/sbbs/src/sbbs3
    In directory cvs:/tmp/cvs-serv26214

    Modified Files:
    js_msgbase.c
    Log Message:
    Added support for new(ish) msg header fields: 'editor' and 'columns'.



    ---
    ■ Synchronet ■ Vertrauen ■ Home of Synchronet ■ [vert/cvs/bbs].synchro.net
  • From rswindell@VERT to CVS commit on Tue Feb 19 09:13:51 2019
    src/sbbs3 js_msgbase.c 1.227 1.228
    Update of /cvsroot/sbbs/src/sbbs3
    In directory cvs:/home/rswindell/sbbs/src/sbbs3

    Modified Files:
    js_msgbase.c
    Log Message:
    Fix long-standing bug in js_ParseMsgHeaderObject which is only (currently)
    used by js_post_msg() (the JS bbs.post_msg() method when used with the reply_header object argument) - the private data attached to a message
    header object is of type privatemsg_t, not private_t. This caused the dereferences of and assignments to p->smb_result in parse_header_object()
    to corrupt the privatemsg_t->msg memory causing heap corruption (caught
    on Windows debug builds in js_get_msg_header_finalize()) and stack faults (caught on Linux-gcc in parse_recipient_object()). This one was hard to
    find. <whew!>



    ---
    ■ Synchronet ■ Vertrauen ■ Home of Synchronet ■ [vert/cvs/bbs].synchro.net
  • From rswindell@VERT to CVS commit on Wed Mar 13 20:41:06 2019
    src/sbbs3 js_msgbase.c 1.229 1.230
    Update of /cvsroot/sbbs/src/sbbs3
    In directory cvs:/tmp/cvs-serv7623

    Modified Files:
    js_msgbase.c
    Log Message:
    Rewind the msgbase index file before calling fread(). The fread() would
    fail if the current file pointer (offset) was not currently at the beginning
    of the file. So calling MsgBase.get_all_msg_headers() after previously calling any method that read/seeked the index would cause the reported error:
    "index read (xxxx) failed"



    ---
    ■ Synchronet ■ Vertrauen ■ Home of Synchronet ■ [vert/cvs/bbs].synchro.net
  • From rswindell@VERT to CVS commit on Fri Mar 15 21:04:01 2019
    src/sbbs3 js_msgbase.c 1.230 1.231
    Update of /cvsroot/sbbs/src/sbbs3
    In directory cvs:/home/rswindell/sbbs/src/sbbs3

    Modified Files:
    js_msgbase.c
    Log Message:
    MsgBase.get_all_msg_headers() is now more tolerant of corrupted msg bases,
    or more specifically, if the index (.sid) file is of an unexpected size
    (too big or too small) handle that situation gracefully.



    ---
    ■ Synchronet ■ Vertrauen ■ Home of Synchronet ■ [vert/cvs/bbs].synchro.net
  • From Nightfox@VERT/DIGDIST to rswindell on Sun Mar 17 21:28:20 2019
    Modified Files:
    js_msgbase.c
    Log Message:
    MsgBase.get_all_msg_headers() is now more tolerant of corrupted msg bases,
    or more specifically, if the index (.sid) file is of an unexpected size
    (too big or too small) handle that situation gracefully.


    That seems to help. Thanks.

    Nightfox

    ---
    ■ Synchronet ■ Digital Distortion: digitaldistortionbbs.com
  • From rswindell@VERT to CVS commit on Mon Apr 1 19:08:07 2019
    src/sbbs3 js_msgbase.c 1.232 1.233
    Update of /cvsroot/sbbs/src/sbbs3
    In directory cvs:/tmp/cvs-serv32422

    Modified Files:
    js_msgbase.c
    Log Message:
    Fix the message base corruption caused by previous committed changes to js_put_msg_header (MsgBase.put_msg_header) - we can't free the memory associated with 'gotten' msg header. Just use the header offset from the
    header retrieved via MsgBase.get_msg_header() - for fast lookup.
    Also fixed an innocuous extra increment of 'n' in argv/argc loop.



    ---
    ■ Synchronet ■ Vertrauen ■ Home of Synchronet ■ [vert/cvs/bbs].synchro.net
  • From rswindell@VERT to CVS commit on Fri Apr 5 21:39:31 2019
    src/sbbs3 js_msgbase.c 1.233 1.234
    Update of /cvsroot/sbbs/src/sbbs3
    In directory cvs:/tmp/cvs-serv21665

    Modified Files:
    js_msgbase.c
    Log Message:
    New MsgBase method: get_index() - returns an array of all message index records (objects, in the same format as returned by the get_mgs_index() method)
    much faster than iterating through a loop, calling the get_msg_index() method for each message. If you want to load messages (e.g. headers, text), filtering by criteria found in the message index (attributes, to/from user, subject CRC) loading a list of indexes and filtering before calling get_msg_header() for the selected messages is much faster than previously available MsgBase object methods (e.g. get_all_msg_headers()). If you don't need to filter the loaded messages (you really want *all* message headers), then get_index() is of no benefit to you, the script-writer. This is most useful for the "mail" msgbase where selective loading of messages is more common.



    ---
    ■ Synchronet ■ Vertrauen ■ Home of Synchronet ■ [vert/cvs/bbs].synchro.net
  • From rswindell@VERT to CVS commit on Sat Apr 6 05:02:38 2019
    src/sbbs3 js_msgbase.c 1.234 1.235
    Update of /cvsroot/sbbs/src/sbbs3
    In directory cvs:/tmp/cvs-serv10497

    Modified Files:
    js_msgbase.c
    Log Message:
    MsgBase.put_msg_header() now updates the internal (smbmsg_t) representation
    of the message header so that functions that need it (e.g. bbs.show_msg_header) don't use/show stale data. This change requires the updated smb_copymsgmem() which clear/sets message convenience pointers upon copying hfields from one message header to another.



    ---
    ■ Synchronet ■ Vertrauen ■ Home of Synchronet ■ [vert/cvs/bbs].synchro.net
  • From rswindell@VERT to CVS commit on Tue Apr 9 16:24:24 2019
    src/sbbs3 js_msgbase.c 1.235 1.236
    Update of /cvsroot/sbbs/src/sbbs3
    In directory cvs:/tmp/cvs-serv21407

    Modified Files:
    js_msgbase.c
    Log Message:
    Resolve GCC warning: unused variable 'argv'



    ---
    ■ Synchronet ■ Vertrauen ■ Home of Synchronet ■ [vert/cvs/bbs].synchro.net
  • From rswindell@VERT to CVS commit on Wed Apr 10 22:30:18 2019
    src/sbbs3 js_msgbase.c 1.237 1.238
    Update of /cvsroot/sbbs/src/sbbs3
    In directory cvs:/home/rswindell/sbbs/src/sbbs3

    Modified Files:
    js_msgbase.c
    Log Message:
    Added msg header 'text_length' property, which is usually the same as 'data_length', but not always (e.g. may include text from some header
    fields, excludes any non-text data fields).
    Mark 'data_length' msg header property as read-only.



    ---
    ■ Synchronet ■ Vertrauen ■ Home of Synchronet ■ [vert/cvs/bbs].synchro.net
  • From rswindell@VERT to CVS commit on Thu Apr 11 07:08:04 2019
    src/sbbs3 js_msgbase.c 1.238 1.239
    Update of /cvsroot/sbbs/src/sbbs3
    In directory cvs:/tmp/cvs-serv6537

    Modified Files:
    js_msgbase.c
    Log Message:
    The *_net_addr hfields can have a valid string even when the corresponding *_net_type hfield has a value of 0 (NET_NONE) - according to smbdefs.h.



    ---
    ■ Synchronet ■ Vertrauen ■ Home of Synchronet ■ [vert/cvs/bbs].synchro.net
  • From rswindell@VERT to CVS commit on Mon Apr 29 01:07:14 2019
    src/sbbs3 js_msgbase.c 1.239 1.240
    Update of /cvsroot/sbbs/src/sbbs3
    In directory cvs:/tmp/cvs-serv9181

    Modified Files:
    js_msgbase.c
    Log Message:
    Add support for new message header fields:
    - to_list (RFC822TO, previosuly unavailable via JS)
    - cc_list
    - replyto_list (RFC822REPLYTO, previously unavailable via JS)

    Added RFC822FROM to the "field_list" array (previously unavailable via JS). Removed SMB_CARBONCOPY from the "field_list" (now duplicated in cc_list).



    ---
    ■ Synchronet ■ Vertrauen ■ Home of Synchronet ■ [vert/cvs/bbs].synchro.net
  • From rswindell@VERT to CVS commit on Mon Apr 29 02:46:48 2019
    src/sbbs3 js_msgbase.c 1.240 1.241
    Update of /cvsroot/sbbs/src/sbbs3
    In directory cvs:/tmp/cvs-serv26854

    Modified Files:
    js_msgbase.c
    Log Message:
    Includes SMTP "Received" header fields in field_list array.
    Refer to the dubious get_msg_body() feature of dot-stuffing as that ("dot-stuffing") and not "rfc822-encoding" - because it isn't.
    dot-stuffing is a requirment of SMTP (RFC*821) and NNTP, not RFC822 (oops).



    ---
    ■ Synchronet ■ Vertrauen ■ Home of Synchronet ■ [vert/cvs/bbs].synchro.net
  • From rswindell@VERT to CVS commit on Tue Apr 30 05:26:26 2019
    src/sbbs3 js_msgbase.c 1.241 1.242
    Update of /cvsroot/sbbs/src/sbbs3
    In directory cvs:/tmp/cvs-serv16191

    Modified Files:
    js_msgbase.c
    Log Message:
    Added the (optional) message header object read-only MIME-related properties:
    - mime_version (from the message header, if MIME)
    - content_type (from the messgae header, if MIME)
    - charset (from the plain-text MIME portion content-type header field)



    ---
    ■ Synchronet ■ Vertrauen ■ Home of Synchronet ■ [vert/cvs/bbs].synchro.net
  • From rswindell@VERT to CVS commit on Wed May 1 21:18:56 2019
    src/sbbs3 js_msgbase.c 1.242 1.243
    Update of /cvsroot/sbbs/src/sbbs3
    In directory cvs:/tmp/cvs-serv8956

    Modified Files:
    js_msgbase.c
    Log Message:
    get_all_msg_headers():
    Copy the upvotes, downvotes, and total_votes to the smbmsg_t, replicating
    what is done in sbbs_t::scanposts() - these are used by sbbs_t::show_msghdr() so we need to copy them if we're going to be replicating that functionality (showing up/down votes and score) in message headers shown with bbs.show_msg() and bbs.show_msg_header().


    ---
    ■ Synchronet ■ Vertrauen ■ Home of Synchronet ■ [vert/cvs/bbs].synchro.net
  • From rswindell@VERT to CVS commit on Thu May 2 21:27:56 2019
    src/sbbs3 js_msgbase.c 1.244 1.245
    Update of /cvsroot/sbbs/src/sbbs3
    In directory cvs:/tmp/cvs-serv1076

    Modified Files:
    js_msgbase.c
    Log Message:
    Document the message header fields:
    - votes
    - priority
    - delivery_attempts



    ---
    ■ Synchronet ■ Vertrauen ■ Home of Synchronet ■ [vert/cvs/bbs].synchro.net
  • From rswindell@VERT to CVS commit on Tue Jul 16 05:04:31 2019
    src/sbbs3 js_msgbase.c 1.248 1.249
    Update of /cvsroot/sbbs/src/sbbs3
    In directory cvs:/tmp/cvs-serv14339

    Modified Files:
    js_msgbase.c
    Log Message:
    Use Spidermonkey's JS_ValueToECMAUint32() rather than our own JS_ValueToUint32() for converting to integers where we may need the full 32 bits.


    ---
    ■ Synchronet ■ Vertrauen ■ Home of Synchronet ■ [vert/cvs/bbs].synchro.net
  • From rswindell@VERT to CVS commit on Wed Jul 24 06:29:03 2019
    src/sbbs3 js_msgbase.c 1.249 1.250
    Update of /cvsroot/sbbs/src/sbbs3
    In directory cvs:/tmp/cvs-serv22884

    Modified Files:
    js_msgbase.c
    Log Message:
    New read-only msg header property populated by get_msg_header() method:
    - Boolean: is_utf8
    In the case of multi-part MIME messages, this may not be populated
    accurately until the message body is read with the get_msg_body() method.



    ---
    ■ Synchronet ■ Vertrauen ■ Home of Synchronet ■ [vert/cvs/bbs].synchro.net
  • From rswindell@VERT to CVS commit on Tue Aug 6 02:04:30 2019
    src/sbbs3 js_msgbase.c 1.250 1.251
    Update of /cvsroot/sbbs/src/sbbs3
    In directory cvs:/tmp/cvs-serv14631

    Modified Files:
    js_msgbase.c
    Log Message:
    Handle setting msg.hdr.delivery_attempts in parse_header_object()



    ---
    ■ Synchronet ■ Vertrauen ■ Home of Synchronet ■ [vert/cvs/bbs].synchro.net
  • From rswindell@VERT to CVS commit on Fri Aug 23 01:50:06 2019
    src/sbbs3 js_msgbase.c 1.251 1.252
    Update of /cvsroot/sbbs/src/sbbs3
    In directory cvs:/tmp/cvs-serv23668

    Modified Files:
    js_msgbase.c
    Log Message:
    Add ftn_charset property for message headers. This header field corresponds with the FTN (FTS-5003) "CHRS" control line/paragraph. The values recoginized by Synchronet are:
    "ASCII 1"
    "CP437 2"
    "UTF-8 4"

    These values indicate that header fields and body text of a message are
    encoded with the specifiec charset. The default (assumed charset, if not specified), is CP437.



    ---
    ■ Synchronet ■ Vertrauen ■ Home of Synchronet ■ [vert/cvs/bbs].synchro.net
  • From rswindell@VERT to CVS commit on Sun Mar 1 04:52:14 2020
    src/sbbs3 js_msgbase.c 1.252 1.253
    Update of /cvsroot/sbbs/src/sbbs3
    In directory cvs:/tmp/cvs-serv10423

    Modified Files:
    js_msgbase.c
    Log Message:
    Bug-fix: when enumerating a message header (returned from MsgBase.get_msg_header or get_all_msg_headers), the message header object's private data (used internally in these C source functions) would be freed and NULL'd, apparenty as a form of optimization. This would cause some methods which can accept a msg header object as an argument (e.g. MsgBase.put_msg_header, bbs.show_msg/show_msg_header) to fail or behave
    in strange ways.

    Instead of freeing/NULLing the private data (and depending on that as an indication that the header has been enuemrated), just set a member variable indicating that the header has been enumerated (once) already.

    This is the bug that has been tripping me up with my message lister JS mod
    (see YouTube video). I can finally get that committed to CVS for testing now. :-)


    ---
    ■ Synchronet ■ Vertrauen ■ Home of Synchronet ■ [vert/cvs/bbs].synchro.net
  • From Nightfox@VERT/DIGDIST to rswindell on Sun Mar 1 16:10:32 2020
    Re: src/sbbs3/js_msgbase.c
    By: rswindell to CVS commit on Sat Feb 29 2020 11:52 pm

    This is the bug that has been tripping me up with my message lister JS mod (see YouTube video). I can finally get that committed to CVS for testing now. :-)

    w00t! :)
    With something like that more officially built into Synchronet, I was considering whether it would be worth it to continue maintaining my own message reader..

    Nightfox

    ---
    ■ Synchronet ■ Digital Distortion: digitaldistortionbbs.com
  • From Digital Man@VERT to Nightfox on Sun Mar 1 16:47:11 2020
    Re: src/sbbs3/js_msgbase.c
    By: Nightfox to rswindell on Sun Mar 01 2020 11:10 am

    Re: src/sbbs3/js_msgbase.c
    By: rswindell to CVS commit on Sat Feb 29 2020 11:52 pm

    This is the bug that has been tripping me up with my message lister JS mod (see YouTube video). I can finally get that committed to CVS for testing now. :-)

    w00t! :)
    With something like that more officially built into Synchronet, I was considering whether it would be worth it to continue maintaining my own message reader..

    Well, it's not exactly "built-in". And it's certainly still a proof of concept, so unlikely to be a good candidate for full-time use just yet. Also, I don't think it's going to replace message-scans like your reader can/does. Or at least, not yet. Right now, it's a functions pretty well to read mail and list/search/sort messages in a sub, but not useful for new-msg-scans.

    digital man

    Synchronet/BBS Terminology Definition #15:
    CVS = Concurrent Versioning System
    Norco, CA WX: 57.8°F, 57.0% humidity, 4 mph WSW wind, 0.00 inches rain/24hrs

    ---
    ■ Synchronet ■ Vertrauen ■ Home of Synchronet ■ [vert/cvs/bbs].synchro.net
  • From Digital Man@VERT to Nightfox on Sun Mar 1 17:43:55 2020
    Re: src/sbbs3/js_msgbase.c
    By: Digital Man to Nightfox on Sun Mar 01 2020 11:47 am

    Re: src/sbbs3/js_msgbase.c
    By: Nightfox to rswindell on Sun Mar 01 2020 11:10 am

    Re: src/sbbs3/js_msgbase.c
    By: rswindell to CVS commit on Sat Feb 29 2020 11:52 pm

    This is the bug that has been tripping me up with my message lister JS mod (see YouTube video). I can finally get that committed to CVS for testing now. :-)

    w00t! :)
    With something like that more officially built into Synchronet, I was considering whether it would be worth it to continue maintaining my own message reader..

    Well, it's not exactly "built-in". And it's certainly still a proof of concept, so unlikely to be a good candidate for full-time use just yet. Also, I don't think it's going to replace message-scans like your reader can/does. Or at least, not yet. Right now, it's a functions pretty well to read mail and list/search/sort messages in a sub, but not useful for new-msg-scans.

    Anything I could do to encourage you to continue your message reader development? It's definitely beneficial to have other developers trying things and attacking problems from a different angle. So I'm certainly not trying to compete with your mod or disaude you from continuing to use/improve upon it. I hope you do.

    digital man

    Synchronet "Real Fact" #63:
    "Baja" (name of Synchronet PCMS compiler/languege) is pronounced "ba-ha". Norco, CA WX: 53.9°F, 72.0% humidity, 8 mph NNE 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 Mar 1 19:21:58 2020
    Re: src/sbbs3/js_msgbase.c
    By: Digital Man to Nightfox on Sun Mar 01 2020 11:47 am

    With something like that more officially built into Synchronet, I was
    considering whether it would be worth it to continue maintaining my
    own message reader..

    Well, it's not exactly "built-in".

    True.. I guess "built-in" wasn't the best choice of words; I just meant something more official included with Synchronet.

    And it's certainly still a proof of
    concept, so unlikely to be a good candidate for full-time use just yet. Also, I don't think it's going to replace message-scans like your reader can/does. Or at least, not yet. Right now, it's a functions pretty well to

    Would it be an easy thing to support using Synchronet's stock message scan, but to be able to just swap out the mesage reader interface with a .js script? The difference I'd see useful there would be to be able to support scrolling up & down in the message (for ANSI users).

    Nightfox

    ---
    ■ Synchronet ■ Digital Distortion: digitaldistortionbbs.com
  • From Nightfox@VERT/DIGDIST to Digital Man on Sun Mar 1 19:34:54 2020
    Re: src/sbbs3/js_msgbase.c
    By: Digital Man to Nightfox on Sun Mar 01 2020 12:43 pm

    Anything I could do to encourage you to continue your message reader development? It's definitely beneficial to have other developers trying things and attacking problems from a different angle. So I'm certainly not trying to compete with your mod or disaude you from continuing to use/improve upon it. I hope you do.

    I know you aren't trying to compete. The main reason I created my message reader was to provide a scrolling interface when reading messages. If that will be part of an officially-included JS script, I actually have no problem with that. And as the author of Synchronet, you are very familiar with the C/C++ source code, so you could probably more easily optimize that code to help the JS scripts perform better, if there are optimizations that can be done.

    There are some other features I've added to my reader, and I don't remember now if the stock Synchronet reader does all these:
    - The ability to forward a message to a user/email address (I've used this for sending a Dove-Net message to myself to remind myself of something someone said about Synchronet, etc.)
    - The ability to save a message to the BBS machine (for sysops)
    - Users can download attachments in their personal email
    - The ability to switch between the reader and the list of messages in the current sub-board and choose another message to read
    - The ability to change to another sub-board from the reader or message list and read/list messages in the other chosen sub-board

    Also I like to implement a lightbar interface where possible, for ANSI users (and for non-ANSI terminals, I like to fall back to a more traditional interface).

    I can't think of a whole lot that could help with continued development. One thing though is that when I list the messages, I use get_all_msg_headers() so I can filter out the voting replies, deleted messages, etc., and that can be a little slow if there are many messages in a sub-board. I'm not sure if there's much that can be done to help that though..

    Nightfox

    ---
    ■ Synchronet ■ Digital Distortion: digitaldistortionbbs.com
  • From rswindell@VERT to CVS commit on Sun Mar 1 20:51:25 2020
    src/sbbs3 js_msgbase.c 1.253 1.254
    Update of /cvsroot/sbbs/src/sbbs3
    In directory cvs:/tmp/cvs-serv11059

    Modified Files:
    js_msgbase.c
    Log Message:
    JS_GetClass() can return NULL. Don't dereference the return value without checking for non-NULL value.


    ---
    ■ Synchronet ■ Vertrauen ■ Home of Synchronet ■ [vert/cvs/bbs].synchro.net
  • From Digital Man@VERT to Nightfox on Sun Mar 1 21:34:17 2020
    Re: src/sbbs3/js_msgbase.c
    By: Nightfox to Digital Man on Sun Mar 01 2020 02:21 pm

    And it's certainly still a proof of
    concept, so unlikely to be a good candidate for full-time use just yet. Also, I don't think it's going to replace message-scans like your reader can/does. Or at least, not yet. Right now, it's a functions pretty well to

    Would it be an easy thing to support using Synchronet's stock message scan, but to be able to just swap out the mesage reader interface with a .js script? The difference I'd see useful there would be to be able to support scrolling up & down in the message (for ANSI users).

    I've thought about that as well, but no, not easy. The main reason is that to scroll back through a message, the script needs to be parsing keyboard input (e.g. for arrow keys, page up/dn, etc.) rather than accepting a command key (e.g. 'Q' for quit, Enter for next message, etc.). The command key input in the "stock message scan" is in the C++ source. So you can't combine a JS scroll-back with a C++ command-key/input parsing. The control is either in the JS module or it's in the C++ code, never both simultaneously.

    If the JS module did all the command-key parsing, then would have to handle those keys and thus be able to move to another message (e.g. thread-forward/back), find text in messages, list headers, etc. And now you're just back to a full-fledge message reader module.

    I suppose that a script could parse all the message scrolling keys and then just return to the BBS the value of any other key that is hit so that those other command keys could then be acted upon by the existing C++ code. It'd be bouncing back and forth between and JS and C++ a lot and it's a bit akward to be returning a key value from a script (but not impossible).

    Anyway, it's likely possible (really, anything is possible), but I don't see it being "easy".

    digital man

    Synchronet/BBS Terminology Definition #32:
    FTS = FidoNet Technical Standard
    Norco, CA WX: 51.0°F, 75.0% humidity, 1 mph N wind, 0.00 inches rain/24hrs

    ---
    ■ Synchronet ■ Vertrauen ■ Home of Synchronet ■ [vert/cvs/bbs].synchro.net
  • From Digital Man@VERT to Nightfox on Sun Mar 1 21:39:50 2020
    Re: src/sbbs3/js_msgbase.c
    By: Nightfox to Digital Man on Sun Mar 01 2020 02:34 pm

    Re: src/sbbs3/js_msgbase.c
    By: Digital Man to Nightfox on Sun Mar 01 2020 12:43 pm

    Anything I could do to encourage you to continue your message reader development? It's definitely beneficial to have other developers trying things and attacking problems from a different angle. So I'm certainly not trying to compete with your mod or disaude you from continuing to use/improve upon it. I hope you do.

    I know you aren't trying to compete. The main reason I created my message reader was to provide a scrolling interface when reading messages. If that will be part of an officially-included JS script, I actually have no problem with that. And as the author of Synchronet, you are very familiar with the C/C++ source code, so you could probably more easily optimize that code to help the JS scripts perform better, if there are optimizations that can be done.

    Yeah and when I find that there isn't JS support for something nice to have or needed, I usually add it right away and make use of it.

    There are some other features I've added to my reader, and I don't remember now if the stock Synchronet reader does all these:
    - The ability to forward a message to a user/email address (I've used this for sending a Dove-Net message to myself to remind myself of something someone said about Synchronet, etc.)

    Not exactly. You can (M)ail reply to yourself though.

    - The ability to save a message to the BBS machine (for sysops)

    Yup.

    - Users can download attachments in their personal email

    Yup (wouldn't it be weird if they couldn't?)

    - The ability to switch between the reader and the list of messages in the current sub-board and choose another message to read

    Well, that's in my msglist mod. The stock message scan/read interface doesn't really have a "mode" to switch between.

    - The ability to change to another sub-board from the reader or message list and read/list messages in the other chosen sub-board

    Nope.

    Also I like to implement a lightbar interface where possible, for ANSI users (and for non-ANSI terminals, I like to fall back to a more traditional interface).

    Yup, me too. Just more work. :-)

    I can't think of a whole lot that could help with continued development.
    One thing though is that when I list the messages, I use get_all_msg_headers() so I can filter out the voting replies, deleted messages, etc., and that can be a little slow if there are many messages in a sub-board. I'm not sure if there's much that can be done to help that though..

    get_all_msg_headers() is the fastest way to load all the message headers. There is an argument for the automatic filtering of votes. And that's what I use in my msglist module.

    digital man

    Synchronet "Real Fact" #39:
    Synchronet first supported Windows NT v6.x (a.k.a. Vista/Win7) w/v3.14a (2006). Norco, CA WX: 51.0°F, 75.0% humidity, 1 mph N wind, 0.00 inches rain/24hrs

    ---
    ■ Synchronet ■ Vertrauen ■ Home of Synchronet ■ [vert/cvs/bbs].synchro.net
  • From DaiTengu@VERT/ENSEMBLE to Nightfox on Mon Mar 2 13:02:48 2020
    Re: src/sbbs3/js_msgbase.c
    By: Nightfox to rswindell on Sun Mar 01 2020 11:10 am

    w00t! :)
    With something like that more officially built into Synchronet, I was considering whether it would be worth it to continue maintaining my own message reader..

    Please continue. Until your message reader came along, I used to have to use GoldEd, or download everthing as a QWK packet.

    The only things I wish it would do is print some sort of status while it's scanning message bases, and have the ability to reply to a message in a different message area (I came across the latter one today, actually)

    Otherwise it's the bees knees, and I thank you for it!

    DaiTengu

    ... I haven't lost my mind; it's backed up on tape somewhere!

    ---
    ■ Synchronet ■ War Ensemble BBS - The sport is war, total war - warensemble.com
  • From Nightfox@VERT/DIGDIST to DaiTengu on Mon Mar 2 17:16:15 2020
    Re: src/sbbs3/js_msgbase.c
    By: DaiTengu to Nightfox on Mon Mar 02 2020 08:02 am

    Please continue. Until your message reader came along, I used to have to use GoldEd, or download everthing as a QWK packet.

    The only things I wish it would do is print some sort of status while it's scanning message bases,

    I'm not sure what you mean? While doing a newscan etc., it does print the sub-board names while it's scanning.

    and have the ability to reply to a message in a
    different message area (I came across the latter one today, actually)

    I'm not sure what you mean by this? When you reply to a message, you will be replying to the current message in whatever sub-board it's in. Do you mean some sort of cross-post feature? A cross-post wouldn't be a feature of a message reader. With SlyEdit, you can cross-post, and with the cross-posting feature, you could also change the sub-board that your reply will be posted in, in case you want it to be posted in a more appropriate sub-board.

    Otherwise it's the bees knees, and I thank you for it!

    I'm glad you enjoy using it. It seems like Digital Man might be incorporating similar functionality though.

    Nightfox

    ---
    ■ Synchronet ■ Digital Distortion: digitaldistortionbbs.com
  • From Digital Man@VERT to Nightfox on Mon Mar 2 19:26:54 2020
    Re: src/sbbs3/js_msgbase.c
    By: Nightfox to DaiTengu on Mon Mar 02 2020 12:16 pm

    I'm not sure what you mean by this? When you reply to a message, you will be replying to the current message in whatever sub-board it's in. Do you mean some sort of cross-post feature? A cross-post wouldn't be a feature of a message reader. With SlyEdit, you can cross-post, and with the cross-posting feature, you could also change the sub-board that your reply will be posted in, in case you want it to be posted in a more appropriate sub-board.

    How's that work? From sbbs's perspective, an external message editor (e.g. SlyEdit) is just editing a text file (the message text) and possibly a drop file (e.g. result.ed). I'm not clear how you can change the area where a message is being saved from an external message editor.

    digital man

    This Is Spinal Tap quote #33:
    Nigel Tufnel: Well, so what? What's wrong with bein' sexy?
    Norco, CA WX: 65.0°F, 27.0% humidity, 6 mph SW wind, 0.00 inches rain/24hrs

    ---
    ■ Synchronet ■ Vertrauen ■ Home of Synchronet ■ [vert/cvs/bbs].synchro.net
  • From Nightfox@VERT/DIGDIST to Digital Man on Mon Mar 2 20:24:54 2020
    Re: src/sbbs3/js_msgbase.c
    By: Digital Man to Nightfox on Mon Mar 02 2020 02:26 pm

    Do you mean some sort of cross-post feature? A cross-post wouldn't be
    a feature of a message reader. With SlyEdit, you can cross-post, and
    with the cross-posting feature, you could also change the sub-board
    that your reply will be posted in, in case you want it to be posted in
    a more appropriate sub-board.

    How's that work? From sbbs's perspective, an external message editor (e.g. SlyEdit) is just editing a text file (the message text) and possibly a drop file (e.g. result.ed). I'm not clear how you can change the area where a message is being saved from an external message editor.

    SlyEdit lets you cross-post by selecting additional areas to post a message in (useful if you want to post a message in different message networks, for instance). SlyEdit uses MsgBase.save_msg() to post the message to sub-boards other than the one currently being posted in. If you want to just change the area where your message is being posted, you can de-select the current sub-board and select another sub-board, and SlyEdit will use MsgBase.save_msg() to post in the other sub-board and will then clear the current message and return an "aborted" code so that Synchronet won't post it in the original sub-board.

    Nightfox

    ---
    ■ Synchronet ■ Digital Distortion: digitaldistortionbbs.com
  • From Digital Man@VERT to Nightfox on Mon Mar 2 21:43:13 2020
    Re: src/sbbs3/js_msgbase.c
    By: Nightfox to Digital Man on Mon Mar 02 2020 03:24 pm

    Re: src/sbbs3/js_msgbase.c
    By: Digital Man to Nightfox on Mon Mar 02 2020 02:26 pm

    Do you mean some sort of cross-post feature? A cross-post wouldn't be
    a feature of a message reader. With SlyEdit, you can cross-post, and
    with the cross-posting feature, you could also change the sub-board
    that your reply will be posted in, in case you want it to be posted in
    a more appropriate sub-board.

    How's that work? From sbbs's perspective, an external message editor (e.g. SlyEdit) is just editing a text file (the message text) and possibly a drop file (e.g. result.ed). I'm not clear how you can change the area where a message is being saved from an external message editor.

    SlyEdit lets you cross-post by selecting additional areas to post a message in (useful if you want to post a message in different message networks, for instance). SlyEdit uses MsgBase.save_msg() to post the message to sub-boards other than the one currently being posted in. If you want to just change the area where your message is being posted, you can de-select the current sub-board and select another sub-board, and SlyEdit will use MsgBase.save_msg() to post in the other sub-board and will then clear the current message and return an "aborted" code so that Synchronet won't post it in the original sub-board.

    Ewww.... Okay, I guess that "works". So you wouldn't get Synchronet-added signatures and other things that happen when a message is posted may not happen. So I would expect some weird behavior and corner-cases when using that feature of your editor.

    digital man

    Synchronet/BBS Terminology Definition #77:
    TTY = Teletype (dumb terminal)
    Norco, CA WX: 65.8°F, 27.0% humidity, 0 mph SW wind, 0.00 inches rain/24hrs

    ---
    ■ Synchronet ■ Vertrauen ■ Home of Synchronet ■ [vert/cvs/bbs].synchro.net
  • From Nightfox@VERT/DIGDIST to Digital Man on Mon Mar 2 22:15:38 2020
    Re: src/sbbs3/js_msgbase.c
    By: Digital Man to Nightfox on Mon Mar 02 2020 04:43 pm

    SlyEdit lets you cross-post by selecting additional areas to post a
    message in (useful if you want to post a message in different message
    networks, for instance). SlyEdit uses MsgBase.save_msg() to post the
    message to sub-boards other than the one currently being posted in.
    If you want to just change the area where your message is being
    posted, you can de-select the current sub-board and select another
    sub-board, and SlyEdit will use MsgBase.save_msg() to post in the
    other sub-board and will then clear the current message and return an
    "aborted" code so that Synchronet won't post it in the original
    sub-board.

    Ewww.... Okay, I guess that "works". So you wouldn't get Synchronet-added signatures and other things that happen when a message is posted may not happen. So I would expect some weird behavior and corner-cases when using that feature of your editor.

    When cross-posting to other sub-boards that way, SlyEdit will read the user's signature file and append it to the message - so yes, it will get the user's Synchronet signature. The cross-posting feature was something requested from another sysop, and that was the only way I could think of to do it. I'm not sure if there's a better way..

    Nightfox

    ---
    ■ Synchronet ■ Digital Distortion: digitaldistortionbbs.com
  • From Nightfox@VERT/DIGDIST to Digital Man on Tue Mar 3 01:12:14 2020
    Re: src/sbbs3/js_msgbase.c
    By: Nightfox to Digital Man on Mon Mar 02 2020 05:15 pm

    SlyEdit lets you cross-post by selecting additional areas to post a
    message in (useful if you want to post a message in different message
    networks, for instance). SlyEdit uses MsgBase.save_msg() to post the
    message to sub-boards other than the one currently being posted in.
    If you want to just change the area where your message is being
    posted, you can de-select the current sub-board and select another
    sub-board, and SlyEdit will use MsgBase.save_msg() to post in the
    other sub-board and will then clear the current message and return an
    "aborted" code so that Synchronet won't post it in the original
    sub-board.

    Ewww.... Okay, I guess that "works". So you wouldn't get
    Synchronet-added signatures and other things that happen when a
    message is posted may not happen. So I would expect some weird
    behavior and corner-cases when using that feature of your editor.

    If Synchronet had a JS function or some mechanism to cross-post a user's message to other sub-boards and do everything Synchronet normally does when posting a user's message, that could be useful to SlyEdit.

    Nightfox

    ---
    ■ Synchronet ■ Digital Distortion: digitaldistortionbbs.com
  • From Digital Man@VERT to Nightfox on Tue Mar 3 02:55:41 2020
    Re: src/sbbs3/js_msgbase.c
    By: Nightfox to Digital Man on Mon Mar 02 2020 05:15 pm

    Re: src/sbbs3/js_msgbase.c
    By: Digital Man to Nightfox on Mon Mar 02 2020 04:43 pm

    SlyEdit lets you cross-post by selecting additional areas to post a
    message in (useful if you want to post a message in different message
    networks, for instance). SlyEdit uses MsgBase.save_msg() to post the
    message to sub-boards other than the one currently being posted in.
    If you want to just change the area where your message is being
    posted, you can de-select the current sub-board and select another
    sub-board, and SlyEdit will use MsgBase.save_msg() to post in the
    other sub-board and will then clear the current message and return an
    "aborted" code so that Synchronet won't post it in the original
    sub-board.

    Ewww.... Okay, I guess that "works". So you wouldn't get Synchronet-added signatures and other things that happen when a message is posted may not happen. So I would expect some weird behavior and corner-cases when using that feature of your editor.

    When cross-posting to other sub-boards that way, SlyEdit will read the user's signature file and append it to the message - so yes, it will get the user's Synchronet signature. The cross-posting feature was something requested from another sysop, and that was the only way I could think of to do it. I'm not sure if there's a better way..

    Right now, there is no "better way" (because Synchronet doesn't have that feature), but messages posted in that fashion are going to be noticeabley different from messages posted "normally", main with regards to the header fields added by sbbs when saving a message and the message text post-processing that happens.

    It's probably better to discuss design decisions like that before you go in a "creative" direction. :-) I probably could add some specific support for that feature (maybe in a drop file?) had I known that someone wanted or needed it.

    Are you doing proper security checking in your cross-posting support?

    digital man

    Synchronet/BBS Terminology Definition #71:
    SyncTERM = The Synchronet Terminal Emulator/BBS-client program
    Norco, CA WX: 61.9°F, 20.0% humidity, 5 mph W wind, 0.00 inches rain/24hrs

    ---
    ■ Synchronet ■ Vertrauen ■ Home of Synchronet ■ [vert/cvs/bbs].synchro.net
  • From Digital Man@VERT to Nightfox on Tue Mar 3 03:00:14 2020
    Re: src/sbbs3/js_msgbase.c
    By: Nightfox to Digital Man on Mon Mar 02 2020 08:12 pm

    If Synchronet had a JS function or some mechanism to cross-post a user's message to other sub-boards and do everything Synchronet normally does when posting a user's message, that could be useful to SlyEdit.

    Yeah, I'd never thought about that before. Simply changing which sub-board via a drop file could be done "pretty" easy (not posting to multiple subs). But there are some decisions that are made based on the sub-board's configuration, before the external editor is even invoked. For example, could someone cross post a message into an Anonymous sub-board? Or a private-only sub-board? If yes, would the message be posted anonymously or privately? Can an email be cross-posted into a sub-board? These seem like potentially problematic scenarios.

    digital man

    Synchronet "Real Fact" #27:
    Rob Swindell (digital man) was born approximately 4 hours before the Unix epoch.
    Norco, CA WX: 61.9°F, 20.0% humidity, 5 mph W 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 Mar 3 19:28:35 2020
    Re: src/sbbs3/js_msgbase.c
    By: Digital Man to Nightfox on Mon Mar 02 2020 09:55 pm

    When cross-posting to other sub-boards that way, SlyEdit will read the
    user's signature file and append it to the message - so yes, it will
    get the user's Synchronet signature. The cross-posting feature was
    something requested from another sysop, and that was the only way I
    could think of to do it. I'm not sure if there's a better way..

    Right now, there is no "better way" (because Synchronet doesn't have that feature), but messages posted in that fashion are going to be noticeabley different from messages posted "normally", main with regards to the header fields added by sbbs when saving a message and the message text post-processing that happens.

    It's probably better to discuss design decisions like that before you go in a "creative" direction. :-) I probably could add some specific support for that feature (maybe in a drop file?) had I known that someone wanted or needed it.

    Often I try to work with what is provided in the JS API. I saw that MsgBase.post_msg() was available, and at the time I didn't think there would need to be special support added for user message posting. In the future I'll plan on checking with you on things like that.

    Are you doing proper security checking in your cross-posting support?

    As far as a user being able to post? I thought it was, but it looks like I may have gone in the assumption that the sub-board would not be shown available sub-boards to the user if they weren't able to post there.. I'll have to update SlyEdit to ensure the user has permissions to post before doing so.

    Nightfox

    ---
    ■ Synchronet ■ Digital Distortion: digitaldistortionbbs.com
  • From Nightfox@VERT/DIGDIST to Digital Man on Tue Mar 3 19:30:14 2020
    Re: src/sbbs3/js_msgbase.c
    By: Digital Man to Nightfox on Mon Mar 02 2020 10:00 pm

    If Synchronet had a JS function or some mechanism to cross-post a
    user's message to other sub-boards and do everything Synchronet
    normally does when posting a user's message, that could be useful to
    SlyEdit.

    Yeah, I'd never thought about that before. Simply changing which sub-board via a drop file could be done "pretty" easy (not posting to multiple subs). But there are some decisions that are made based on the sub-board's

    SlyEdit allows posting to multiple sub-boards (i.e., if the message could fit into sub-boards on multiple message networks)..

    configuration, before the external editor is even invoked. For example, could someone cross post a message into an Anonymous sub-board? Or a private-only sub-board? If yes, would the message be posted anonymously or privately? Can an email be cross-posted into a sub-board? These seem like potentially problematic scenarios.

    SlyEdit checks to see if a sub-board is anonymous and whether to use the user's real name or handle before posting.

    Nightfox

    ---
    ■ Synchronet ■ Digital Distortion: digitaldistortionbbs.com
  • From Nightfox@VERT/DIGDIST to Digital Man on Tue Mar 3 21:14:50 2020
    Re: src/sbbs3/js_msgbase.c
    By: Nightfox to Digital Man on Tue Mar 03 2020 02:28 pm

    Are you doing proper security checking in your cross-posting
    support?

    As far as a user being able to post? I thought it was, but it looks like I may have gone in the assumption that the sub-board would not be shown available sub-boards to the user if they weren't able to post there.. I'll have to update SlyEdit to ensure the user has permissions to post before doing so.

    Upon closer look, for cross-posting, SlyEdit already does not allow the user to select a sub-board that they don't have posting permission for.

    Nightfox

    ---
    ■ Synchronet ■ Digital Distortion: digitaldistortionbbs.com
  • From Digital Man@VERT to Nightfox on Tue Mar 3 21:52:02 2020
    Re: src/sbbs3/js_msgbase.c
    By: Nightfox to Digital Man on Tue Mar 03 2020 02:28 pm

    Re: src/sbbs3/js_msgbase.c
    By: Digital Man to Nightfox on Mon Mar 02 2020 09:55 pm

    When cross-posting to other sub-boards that way, SlyEdit will read the
    user's signature file and append it to the message - so yes, it will
    get the user's Synchronet signature. The cross-posting feature was
    something requested from another sysop, and that was the only way I
    could think of to do it. I'm not sure if there's a better way..

    Right now, there is no "better way" (because Synchronet doesn't have that feature), but messages posted in that fashion are going to be noticeabley different from messages posted "normally", main with regards to the header fields added by sbbs when saving a message and the message text post-processing that happens.

    It's probably better to discuss design decisions like that before you go in a "creative" direction. :-) I probably could add some specific support for that feature (maybe in a drop file?) had I known that someone wanted or needed it.

    Often I try to work with what is provided in the JS API. I saw that MsgBase.post_msg() was available, and at the time I didn't think there would need to be special support added for user message posting. In the future I'll plan on checking with you on things like that.

    Are you doing proper security checking in your cross-posting support?

    As far as a user being able to post? I thought it was, but it looks like I may have gone in the assumption that the sub-board would not be shown available sub-boards to the user if they weren't able to post there.. I'll have to update SlyEdit to ensure the user has permissions to post before doing so.

    The user is not "shown" the JS object model normally, so I'm not sure what mechanism you're to provide the user the option of selecting another sub-board to post to. It's certainly possible to have sub-board that a user can read but not post to. That said, the JS msg_area.grp_list and sub_list arrays are filtered based on "access" (not posting) privileges. The msg_area.sub and msg_area.grp arrays are not filtered based on access (contain all subs/groups on the system, regardless of which is user is currently logged int).

    digital man

    Synchronet/BBS Terminology Definition #66:
    SpiderMonkey = Mozilla's C/C++ JavaScript Engine (libmozjs)
    Norco, CA WX: 74.3°F, 18.0% humidity, 2 mph NNW wind, 0.00 inches rain/24hrs

    ---
    ■ Synchronet ■ Vertrauen ■ Home of Synchronet ■ [vert/cvs/bbs].synchro.net
  • From Digital Man@VERT to Nightfox on Tue Mar 3 21:57:53 2020
    Re: src/sbbs3/js_msgbase.c
    By: Nightfox to Digital Man on Tue Mar 03 2020 02:30 pm

    Re: src/sbbs3/js_msgbase.c
    By: Digital Man to Nightfox on Mon Mar 02 2020 10:00 pm

    If Synchronet had a JS function or some mechanism to cross-post a
    user's message to other sub-boards and do everything Synchronet
    normally does when posting a user's message, that could be useful to
    SlyEdit.

    Yeah, I'd never thought about that before. Simply changing which sub-board via a drop file could be done "pretty" easy (not posting to multiple subs). But there are some decisions that are made based on the sub-board's

    SlyEdit allows posting to multiple sub-boards (i.e., if the message could fit into sub-boards on multiple message networks)..

    There are sub-board settings that are used to post-process the message text created by an external editor, so the same message text may not be suitable (without modification) for multiple sub-boards, depending on the sysop's configuration.

    configuration, before the external editor is even invoked. For example, could someone cross post a message into an Anonymous sub-board? Or a private-only sub-board? If yes, would the message be posted anonymously or privately? Can an email be cross-posted into a sub-board? These seem like potentially problematic scenarios.

    SlyEdit checks to see if a sub-board is anonymous and whether to use the user's real name or handle before posting.

    Cool, that's something. :-)

    digital man

    Synchronet/BBS Terminology Definition #35:
    HTTP = Hypertext Transfer Protocol
    Norco, CA WX: 74.3°F, 18.0% humidity, 2 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 Mar 3 22:32:56 2020
    Re: src/sbbs3/js_msgbase.c
    By: Digital Man to Nightfox on Tue Mar 03 2020 04:52 pm

    The user is not "shown" the JS object model normally, so I'm not sure what mechanism you're to provide the user the option of selecting another sub-board to post to. It's certainly possible to have sub-board that a user can read but not post to. That said, the JS msg_area.grp_list and sub_list arrays are filtered based on "access" (not posting) privileges. The msg_area.sub and msg_area.grp arrays are not filtered based on access (contain all subs/groups on the system, regardless of which is user is currently logged int).

    SlyEdit iterates through msg_area.grp_list and then msg_area.grp_list.sub_list to allow the user to select sub-boards to post into. After checking earlier, I remembered SlyEdit already doesn't allow the user to select a sub-board they can't post in.

    Nightfox

    ---
    ■ Synchronet ■ Digital Distortion: digitaldistortionbbs.com
  • From Digital Man@VERT to Nightfox on Wed Mar 4 02:30:44 2020
    Re: src/sbbs3/js_msgbase.c
    By: Nightfox to Digital Man on Tue Mar 03 2020 05:32 pm

    Re: src/sbbs3/js_msgbase.c
    By: Digital Man to Nightfox on Tue Mar 03 2020 04:52 pm

    The user is not "shown" the JS object model normally, so I'm not sure what mechanism you're to provide the user the option of selecting another sub-board to post to. It's certainly possible to have sub-board that a user can read but not post to. That said, the JS msg_area.grp_list and sub_list arrays are filtered based on "access" (not posting) privileges. The msg_area.sub and msg_area.grp arrays are not filtered based on access (contain all subs/groups on the system, regardless of which is user is currently logged int).

    SlyEdit iterates through msg_area.grp_list and then msg_area.grp_list.sub_list to allow the user to select sub-boards to post into. After checking earlier, I remembered SlyEdit already doesn't allow the user to select a sub-board they can't post in.

    Okay, that's good. What method are using to determine if they can or can't post in a sub?

    digital man

    This Is Spinal Tap quote #41:
    Ian Faith: It say's "Memphis show cancelled due to lack of advertising funds." Norco, CA WX: 62.6°F, 33.0% humidity, 1 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 Wed Mar 4 02:51:48 2020
    Re: src/sbbs3/js_msgbase.c
    By: Digital Man to Nightfox on Tue Mar 03 2020 09:30 pm

    post into. After checking earlier, I remembered SlyEdit already
    doesn't allow the user to select a sub-board they can't post in.

    Okay, that's good. What method are using to determine if they can or can't post in a sub?

    This line of code does the check (msgSubCode is the sub-board code):
    if (user.compare_ars(msg_area.sub[msgSubCode].post_ars))

    Nightfox

    ---
    ■ Synchronet ■ Digital Distortion: digitaldistortionbbs.com
  • From Digital Man@VERT to Nightfox on Wed Mar 4 06:38:08 2020
    Re: src/sbbs3/js_msgbase.c
    By: Nightfox to Digital Man on Tue Mar 03 2020 09:51 pm

    Re: src/sbbs3/js_msgbase.c
    By: Digital Man to Nightfox on Tue Mar 03 2020 09:30 pm

    post into. After checking earlier, I remembered SlyEdit already
    doesn't allow the user to select a sub-board they can't post in.

    Okay, that's good. What method are using to determine if they can or can't post in a sub?

    This line of code does the check (msgSubCode is the sub-board code):
    if (user.compare_ars(msg_area.sub[msgSubCode].post_ars))

    Yeah, that's insufficient. For example, that doesn't check weither the user has the 'N' restriction and the sub-board is a networked sub. Instead, you should be checking "can_post" property value of the sub.

    digital man

    Synchronet "Real Fact" #73:
    SyncTERM (created by Deuce) contains portions of Synchronet and SEXYZ code. Norco, CA WX: 55.0°F, 46.0% humidity, 0 mph S wind, 0.00 inches rain/24hrs

    ---
    ■ Synchronet ■ Vertrauen ■ Home of Synchronet ■ [vert/cvs/bbs].synchro.net
  • From Rampage@VERT/SESTAR to Nightfox on Wed Mar 4 12:23:12 2020
    Re: src/sbbs3/js_msgbase.c
    By: Nightfox to Digital Man on Mon Mar 02 2020 17:15:38


    The cross-posting feature was something requested from another
    sysop, and that was the only way I could think of to do it.
    I'm not sure if there's a better way..

    cross-posting and replying in another area, including the netmail/email area, are features that are certainly missing in the base sbbs offerings... there's been numerous times that i've wanted to reply to someone via netmail or in another area to avoid being offtopic or to provide an answer in private...


    )\/(ark

    ---
    ■ Synchronet ■ The SouthEast Star Mail HUB - SESTAR
  • From DaiTengu@VERT/ENSEMBLE to Nightfox on Wed Mar 4 16:30:53 2020
    Re: src/sbbs3/js_msgbase.c
    By: Nightfox to DaiTengu on Mon Mar 02 2020 12:16 pm

    The only things I wish it would do is print some sort of status
    while it's scanning message bases,

    I'm not sure what you mean? While doing a newscan etc., it does print the sub-board names while it's scanning.

    Hmm, it's possible I'm using an older version. When I do a newscan It just hangs at a black screen with a cursor until it finds an area that has new messages. I should probably give my message reading system a once over to verify everything's up to date.

    and have the ability to reply to a message in a
    different message area (I came across the latter one today,
    actually)

    I'm not sure what you mean by this? When you reply to a message, you will be replying to the current message in whatever sub-board it's in. Do you mean some sort of cross-post feature? A cross-post wouldn't be a feature of a message reader. With SlyEdit, you can cross-post, and with the cross-posting feature, you could also change the sub-board that your reply will be posted in, in case you want it to be posted in a more appropriate sub-board.

    Yeah, I somehow spaced on the cross-post option. Apologies. Working 12-16 hour days is killing me, and shredding what little sanity I have left.

    I'm glad you enjoy using it. It seems like Digital Man might be incorporating similar functionality though.

    But, that requires change! I don't like change!

    DaiTengu

    ... Modesty is a vastly overrated virtue.

    ---
    ■ Synchronet ■ War Ensemble BBS - The sport is war, total war - warensemble.com
  • From Digital Man@VERT to Rampage on Wed Mar 4 15:25:16 2020
    Re: src/sbbs3/js_msgbase.c
    By: Rampage to Nightfox on Wed Mar 04 2020 07:23 am

    Re: src/sbbs3/js_msgbase.c
    By: Nightfox to Digital Man on Mon Mar 02 2020 17:15:38


    The cross-posting feature was something requested from another
    sysop, and that was the only way I could think of to do it.
    I'm not sure if there's a better way..

    cross-posting and replying in another area, including the netmail/email area, are features that are certainly missing in the base sbbs offerings... there's been numerous times that i've wanted to reply to someone via netmail or in another area to avoid being offtopic or to provide an answer in private...

    You can already reply via netmail with the 'M' command.

    digital man

    Synchronet/BBS Terminology Definition #64:
    SMB = Synchronet Message Base (e.g. smblib)
    Norco, CA WX: 64.5°F, 36.0% humidity, 0 mph ESE wind, 0.00 inches rain/24hrs

    ---
    ■ Synchronet ■ Vertrauen ■ Home of Synchronet ■ [vert/cvs/bbs].synchro.net
  • From Rampage@VERT/SESTAR to Digital Man on Wed Mar 4 18:43:15 2020
    Re: src/sbbs3/js_msgbase.c
    By: Digital Man to Rampage on Wed Mar 04 2020 10:25:16


    You can already reply via netmail with the 'M' command.

    i'll be damned! you can! i'm used to that stuff showing in the prompt when reading a message... something like

    [N]ext, [P]revious, [R]eply, [M]ail, [O]ther

    and similar... RA's methods are still ingrained and will take a while to me moved out and filled with sbbs methods LUL


    )\/(ark

    ---
    ■ Synchronet ■ The SouthEast Star Mail HUB - SESTAR
  • From Digital Man@VERT to Rampage on Wed Mar 4 16:10:44 2020
    Re: src/sbbs3/js_msgbase.c
    By: Rampage to Digital Man on Wed Mar 04 2020 01:43 pm

    Re: src/sbbs3/js_msgbase.c
    By: Digital Man to Rampage on Wed Mar 04 2020 10:25:16


    You can already reply via netmail with the 'M' command.

    i'll be damned! you can! i'm used to that stuff showing in the prompt when reading a message... something like

    [N]ext, [P]revious, [R]eply, [M]ail, [O]ther

    There are too many options to list them all on a prompt.

    digital man

    Synchronet "Real Fact" #91:
    Captured chat with Wayne Bell: http://wiki.synchro.net/history:waynebell_chat Norco, CA WX: 68.9°F, 34.0% humidity, 2 mph SSE wind, 0.00 inches rain/24hrs

    ---
    ■ Synchronet ■ Vertrauen ■ Home of Synchronet ■ [vert/cvs/bbs].synchro.net
  • From DaiTengu@VERT/ENSEMBLE to Rampage on Wed Mar 4 16:34:27 2020
    Re: src/sbbs3/js_msgbase.c
    By: Rampage to Nightfox on Wed Mar 04 2020 07:23 am

    cross-posting and replying in another area, including the netmail/email area, are features that are certainly missing in the base sbbs offerings... there's been numerous times that i've wanted to reply to someone via netmail or in another area to avoid being offtopic or to provide an answer in private...

    Yeah, it hasn't been an issue until.... recently. There are a lot of messages from a particular user where I've just wanted to reply in a different, more appropriate message area.

    DaiTengu

    ... Life shouldn't be printed on dollar bills.

    ---
    ■ Synchronet ■ War Ensemble BBS - The sport is war, total war - warensemble.com
  • From Nightfox@VERT/DIGDIST to Digital Man on Wed Mar 4 17:35:15 2020
    Re: src/sbbs3/js_msgbase.c
    By: Digital Man to Nightfox on Wed Mar 04 2020 01:38 am

    This line of code does the check (msgSubCode is the sub-board code):
    if (user.compare_ars(msg_area.sub[msgSubCode].post_ars))

    Yeah, that's insufficient. For example, that doesn't check weither the user has the 'N' restriction and the sub-board is a networked sub. Instead, you should be checking "can_post" property value of the sub.

    I'll change it to use can_post. But I'm curious why it matters if it's a networked sub? Are there certain conditions where a user wouldn't be able to post on a networked sub?

    Nightfox

    ---
    ■ Synchronet ■ Digital Distortion: digitaldistortionbbs.com
  • From Nightfox@VERT/DIGDIST to DaiTengu on Wed Mar 4 17:38:24 2020
    Re: src/sbbs3/js_msgbase.c
    By: DaiTengu to Nightfox on Wed Mar 04 2020 11:30 am

    I'm not sure what you mean? While doing a newscan etc., it does
    print the sub-board names while it's scanning.

    Hmm, it's possible I'm using an older version. When I do a newscan It just hangs at a black screen with a cursor until it finds an area that has new messages. I should probably give my message reading system a once over to verify everything's up to date.

    My reader always printed the sub-board names when doing a scan. However, one time after updating my Synchronet binaries, I noticed it doesn't always print all the sub-board names (for me on my BBS). I'm not sure what changed that may have affected that.

    Nightfox

    ---
    ■ Synchronet ■ Digital Distortion: digitaldistortionbbs.com
  • From Nightfox@VERT/DIGDIST to Digital Man on Wed Mar 4 18:00:12 2020
    Re: src/sbbs3/js_msgbase.c
    By: Nightfox to Digital Man on Wed Mar 04 2020 12:35 pm

    Yeah, that's insufficient. For example, that doesn't check weither
    the user has the 'N' restriction and the sub-board is a networked
    sub. Instead, you should be checking "can_post" property value of
    the sub.

    I'll change it to use can_post. But I'm curious why it matters if it's a networked sub? Are there certain conditions where a user wouldn't be able to post on a networked sub?

    I see what you're saying now. You can disregard my question..

    Nightfox

    ---
    ■ Synchronet ■ Digital Distortion: digitaldistortionbbs.com
  • From mark lewis@VERT to Nightfox on Wed Mar 4 21:11:14 2020
    Re: src/sbbs3/js_msgbase.c
    By: Nightfox to Digital Man on Wed Mar 04 2020 12:35:15


    Yeah, that's insufficient. For example, that doesn't check
    weither the user has the 'N' restriction and the sub-board is
    a networked sub. Instead, you should be checking "can_post"
    property value of the sub.

    I'll change it to use can_post. But I'm curious why it
    matters if it's a networked sub? Are there certain
    conditions where a user wouldn't be able to post on a networked
    sub?

    consider a sysop message area where only sysops are allowed to post but anyone may read...

    then you have areas in (eg) fidonet that are restricted to only certain zone, regions, or nets... i'm sure there are other examples where one may read an area but not post in it...


    )\/(ark
    --- SBBSecho 3.10-Linux
    * Origin: SouthEast Star Mail HUB - SESTAR (1:3634/12)
    ■ Synchronet ■ Vertrauen ■ Home of Synchronet ■ [vert/cvs/bbs].synchro.net
  • From Nightfox@VERT/DIGDIST to Digital Man on Wed Mar 4 18:41:08 2020
    Re: src/sbbs3/js_msgbase.c
    By: Digital Man to Nightfox on Wed Mar 04 2020 01:38 am

    This line of code does the check (msgSubCode is the sub-board code):
    if (user.compare_ars(msg_area.sub[msgSubCode].post_ars))

    Yeah, that's insufficient. For example, that doesn't check weither the user has the 'N' restriction and the sub-board is a networked sub. Instead, you should be checking "can_post" property value of the sub.

    Some of the JS documentation could probably be a little clearer on things like that.
    http://www.synchro.net/docs/jsobjs.html
    For can_post, the documentation says "user has sufficient access to post messages". That doesn't really sound different from checking post_ars with the user's access requirements. It might be good to have more explanation of things like that in the JS docs so people developing JS mods can have a better idea of when to use each thing.

    Nightfox

    ---
    ■ Synchronet ■ Digital Distortion: digitaldistortionbbs.com
  • From Nightfox@VERT/DIGDIST to mark lewis on Wed Mar 4 20:08:55 2020
    Re: src/sbbs3/js_msgbase.c
    By: mark lewis to Nightfox on Wed Mar 04 2020 04:11 pm

    I'll change it to use can_post. But I'm curious why it
    matters if it's a networked sub? Are there certain
    conditions where a user wouldn't be able to post on a networked
    sub?

    consider a sysop message area where only sysops are allowed to post but anyone may read...

    Yep. That could be done by setting the ARS string to SYSOP. I found that checking the user's ARS would be sufficient in that case..

    then you have areas in (eg) fidonet that are restricted to only certain zone, regions, or nets... i'm sure there are other examples where one may read an area but not post in it...

    I see..

    Nightfox

    ---
    ■ Synchronet ■ Digital Distortion: digitaldistortionbbs.com
  • From Digital Man@VERT to Nightfox on Wed Mar 4 21:25:51 2020
    Re: src/sbbs3/js_msgbase.c
    By: Nightfox to Digital Man on Wed Mar 04 2020 12:35 pm

    Re: src/sbbs3/js_msgbase.c
    By: Digital Man to Nightfox on Wed Mar 04 2020 01:38 am

    This line of code does the check (msgSubCode is the sub-board code):
    if (user.compare_ars(msg_area.sub[msgSubCode].post_ars))

    Yeah, that's insufficient. For example, that doesn't check weither the user has the 'N' restriction and the sub-board is a networked sub. Instead, you should be checking "can_post" property value of the sub.

    I'll change it to use can_post. But I'm curious why it matters if it's a networked sub? Are there certain conditions where a user wouldn't be able to post on a networked sub?

    Yes, if the user has the 'N' restriction.

    Also, if the user has the 'P' restriction, they can't post in any sub-board.

    And, if the user has already posted their maximum number of posts-per-day allowed (based on their security level), they can't post in any sub-board.

    digital man

    Synchronet/BBS Terminology Definition #62:
    SEXYZ = Synchronet External X/Y/ZMODEM file transfer protocol driver
    Norco, CA WX: 67.9°F, 60.0% humidity, 6 mph SE wind, 0.00 inches rain/24hrs

    ---
    ■ Synchronet ■ Vertrauen ■ Home of Synchronet ■ [vert/cvs/bbs].synchro.net
  • From Digital Man@VERT to Nightfox on Wed Mar 4 21:27:41 2020
    Re: src/sbbs3/js_msgbase.c
    By: Nightfox to Digital Man on Wed Mar 04 2020 01:41 pm

    Re: src/sbbs3/js_msgbase.c
    By: Digital Man to Nightfox on Wed Mar 04 2020 01:38 am

    This line of code does the check (msgSubCode is the sub-board code):
    if (user.compare_ars(msg_area.sub[msgSubCode].post_ars))

    Yeah, that's insufficient. For example, that doesn't check weither the user has the 'N' restriction and the sub-board is a networked sub. Instead, you should be checking "can_post" property value of the sub.

    Some of the JS documentation could probably be a little clearer on things like that.
    http://www.synchro.net/docs/jsobjs.html
    For can_post, the documentation says "user has sufficient access to post messages". That doesn't really sound different from checking post_ars with the user's access requirements. It might be good to have more explanation of things like that in the JS docs so people developing JS mods can have a better idea of when to use each thing.

    True. Developers can and should also look at the existing *.js mods for example best practices to follow.

    digital man

    Synchronet "Real Fact" #26:
    The Synchronet Web Server was written predominantly by Stephen Hurd (Deuce). Norco, CA WX: 67.9°F, 60.0% humidity, 6 mph SE wind, 0.00 inches rain/24hrs

    ---
    ■ Synchronet ■ Vertrauen ■ Home of Synchronet ■ [vert/cvs/bbs].synchro.net
  • From Rampage@VERT/SESTAR to Nightfox on Wed Mar 4 23:52:04 2020
    Re: src/sbbs3/js_msgbase.c
    By: Nightfox to mark lewis on Wed Mar 04 2020 15:08:55


    I'll change it to use can_post. But I'm curious why it
    matters if it's a networked sub? Are there certain
    conditions where a user wouldn't be able to post on a
    networked sub?

    consider a sysop message area where only sysops are allowed
    to post but anyone may read...

    Yep. That could be done by setting the ARS string to SYSOP.

    wrong sysop... "sysops" in my above meant "visiting sysops"... sorry...


    )\/(ark

    ---
    ■ Synchronet ■ The SouthEast Star Mail HUB - SESTAR
  • From rswindell@VERT to CVS commit on Wed Mar 18 04:05:38 2020
    src/sbbs3 js_msgbase.c 1.254 1.255
    Update of /cvsroot/sbbs/src/sbbs3
    In directory cvs:/tmp/cvs-serv23819

    Modified Files:
    js_msgbase.c
    Log Message:
    Fix bug in MsgBase.get_index() and get_all_msg_headers():
    The number of messages loaded was limited by the number of messages that were in the status header the last time the status header was read (i.e. when the msgbase was opened or when any of its status header properties were referenced).

    Also fixed a couple of weird/useless uses of the WHERE macro in error messages.


    ---
    ■ Synchronet ■ Vertrauen ■ Home of Synchronet ■ [vert/cvs/bbs].synchro.net
  • From rswindell@VERT to CVS commit on Thu Mar 19 16:41:33 2020
    src/sbbs3 js_msgbase.c 1.255 1.256
    Update of /cvsroot/sbbs/src/sbbs3
    In directory cvs:/tmp/cvs-serv10236

    Modified Files:
    js_msgbase.c
    Log Message:
    Create MsgBase.dump_msg_header() method which will perform a low-level header "dump" to an array of strings using the (new) smb_msghdr_str_list() SMBLIB function. The message header passed must've been previously returned from
    the get_msg_header() or get_all_msg_headers() method.

    A similar dump could be constructed from the header properties, as available in JS, but that would be inconsistent with other msg header dumps and likely lack header fields or details available from the lowest level dump method provided in SMBLIB.


    ---
    ■ Synchronet ■ Vertrauen ■ Home of Synchronet ■ [vert/cvs/bbs].synchro.net
  • From rswindell@VERT to CVS commit on Sat Apr 4 19:07:05 2020
    src/sbbs3 js_msgbase.c 1.256 1.257
    Update of /cvsroot/sbbs/src/sbbs3
    In directory cvs:/tmp/cvs-serv1155

    Modified Files:
    js_msgbase.c
    Log Message:
    Bug: a get_mg_header() followed by a put_msg_header() would add a header field (SMTPREVERSEPATH a.k.a. "reverse_path") if it didn't already have one.
    That's because smb_getmsghdr() will point the msg.reverse_path convenience pointer to the from_net_addr if there was no explicit reverse-path (e.g. RFC822's
    "return-path" header field). This could manifest itself in *any* change to a message header via JS failing with an "illegal header length increase" error if the added header field just happen to put the total header length over the allocation threshold of the pre-existing msg header.

    Fix: only model a msg header "reverse_path" property if the header field actually existed (not based on the SMBLIB convenience pointer).
    When the expand_fields option is used, the old behavior remains but expanded headers cannot be written back to the base, so no harm there.

    Reported by Coz in #synchronet from failed runs of scrubmsgs.js. Thanks!


    ---
    ■ Synchronet ■ Vertrauen ■ Home of Synchronet ■ [vert/cvs/bbs].synchro.net
  • From rswindell@VERT to CVS commit on Mon Apr 6 02:18:01 2020
    src/sbbs3 js_msgbase.c 1.257 1.258
    Update of /cvsroot/sbbs/src/sbbs3
    In directory cvs:/tmp/cvs-serv9320

    Modified Files:
    js_msgbase.c
    Log Message:
    MsgBase.open() would not, could not, actually create a message base.
    It would create 3 0-byte files (*.shd, *.sdt, *.sid), but more is actually needed for a message base to be "created" (i.e. a call to smb_create()).
    So, MsgBase.open() now uses smb_open_sub() rather than smb_open() to initialize theSMB status fields with the proper default values (based on the sysop configuration) and calls smb_crate() if the header file is empty.
    Yes, normally, SCFG creates message bases, but it shouldn't have to
    (e.g. a fresh install on *nix, doesn't actually start with any files in data/subs) and now that we have JavaScript-based message lister/readers, we really needed this support.


    ---
    ■ Synchronet ■ Vertrauen ■ Home of Synchronet ■ [vert/cvs/bbs].synchro.net
  • From rswindell@VERT to CVS commit on Fri Apr 24 02:08:03 2020
    src/sbbs3 js_msgbase.c 1.259 1.260
    Update of /cvsroot/sbbs/src/sbbs3
    In directory cvs:/tmp/cvs-serv8971

    Modified Files:
    js_msgbase.c
    Log Message:
    The RECIPIENTLIST header field would get removed (converted to an RFC822TO header field) when saving a message using the MsgBase class.
    A similar problem existed with REPLYTOLIST/RFC822REPLYTO, but was not actually observed.
    Since the following header fields were not populated in the msg header "field_list", if they existed in a message header that was modified using
    the MsgBase class, they would be lost:
    - RFC822TO
    - RFC822CC
    - RFC822ORG
    - RFC822REPLYTO
    - RFC822SUBJECT


    ---
    ■ Synchronet ■ Vertrauen ■ Home of Synchronet ■ [vert/cvs/bbs].synchro.net
  • From rswindell@VERT to CVS commit on Thu May 7 16:29:10 2020
    src/sbbs3 js_msgbase.c 1.260 1.261
    Update of /cvsroot/sbbs/src/sbbs3
    In directory cvs:/tmp/cvs-serv3023

    Modified Files:
    js_msgbase.c
    Log Message:
    Allow an added or modified message header to have to/from/reply-to "net type" values of NET_NONE. This is a weird scenario, but it is technically possible (e.g. for nntpservice.js) to save a message with a to/from/treply-to "net address" header, but an associated net-type of NET_NONE. By saving the net-type NET_NONE, when saving a modified header, if the associated net address header field value cannot be parsed into a valid network address, there won't be any error reported, e.g.
    Error -110 adding SENDERNETADDR field to message header


    ---
    ■ Synchronet ■ Vertrauen ■ Home of Synchronet ■ [vert/cvs/bbs].synchro.net
  • From rswindell@VERT to CVS commit on Thu May 7 18:58:38 2020
    src/sbbs3 js_msgbase.c 1.261 1.262
    Update of /cvsroot/sbbs/src/sbbs3
    In directory cvs:/home/rswindell/sbbs/src/sbbs3

    Modified Files:
    js_msgbase.c
    Log Message:
    Populate the *_net_type fields, even when set to NET_NONE (0), when the corresponding *_net_addr field is present (not NULL).



    ---
    ■ Synchronet ■ Vertrauen ■ Home of Synchronet ■ [vert/cvs/bbs].synchro.net
  • From Rob Swindell@VERT to Git commit to sbbs/master on Sun Nov 22 05:14:40 2020
    https://gitlab.synchro.net/sbbs/sbbs/-/commit/325b9b76b4ace104d93cc220
    Modified Files:
    src/sbbs3/js_msgbase.c
    Log Message:
    Resolve newish gcc warning about unused set variable.

    ---
    ■ Synchronet ■ Vertrauen ■ Home of Synchronet ■ [vert/cvs/bbs].synchro.net
  • From Rob Swindell@VERT to Git commit to main/sbbs/master on Sat May 22 21:44:37 2021
    https://gitlab.synchro.net/main/sbbs/-/commit/4c2ec210bbee64521dd85b36
    Modified Files:
    src/sbbs3/js_msgbase.c
    Log Message:
    Fix mime_version and content_type property names in JSDOCS

    Underscores are more JS friendly (and correct).

    ---
    ■ Synchronet ■ Vertrauen ■ Home of Synchronet ■ [vert/cvs/bbs].synchro.net
  • From Rob Swindell@VERT to Git commit to main/sbbs/master on Sat Jul 10 22:58:26 2021
    https://gitlab.synchro.net/main/sbbs/-/commit/e53c5926508c739c27c4d67c
    Modified Files:
    src/sbbs3/js_msgbase.c
    Log Message:
    Ignore the PRIVATE message attribute for the "mail" base

    When setting the value of a message's 'can_read' property, ignore the PRIVATE message attribute (which is sometimes set in FTN netmail messages) since it's assumed all messages in the mail base are private, no special destination (to) name matching is needed here.

    This only popped up recently via msglist.js because of the recent addition of checking each messages's 'can_read' property.

    As reported by <Diehard> via IRC PM.

    ---
    ■ Synchronet ■ Vertrauen ■ Home of Synchronet ■ [vert/cvs/bbs].synchro.net
  • From Rob Swindell@VERT to Git commit to main/sbbs/master on Sun Apr 17 21:20:59 2022
    https://gitlab.synchro.net/main/sbbs/-/commit/4f8f844f38f103e3f1ca4a4c
    Modified Files:
    src/sbbs3/js_msgbase.c
    Log Message:
    Fix LAZY_BOOLEAN macro definition

    This is what was causing the 'is_utf8' message header property to be created as a Number instead of a Boolean.

    ---
    ■ Synchronet ■ Vertrauen ■ Home of Synchronet ■ [vert/cvs/bbs].synchro.net
  • From Rob Swindell@VERT to Git commit to main/sbbs/master on Thu Apr 21 22:09:52 2022
    https://gitlab.synchro.net/main/sbbs/-/commit/1e62752ab8340af66f18f0b0
    Modified Files:
    src/sbbs3/js_msgbase.c
    Log Message:
    Restore ability for MsgBase.open() to open an arbitrary SMB msgbase

    Before commit 5da26eca, you could pass Msgbase() the path to an SMB
    on the disk and open() it, no configuration needed. As of 2 years
    ago, I broke that, and passing a path to an SMB would open the "mail" base instead - most unexpected. This is a feature of smb_open_sub() which we switched to using (from smb_open()), so go back to using smb_open() when
    an unrecognized code is pass to the constructor.

    This has the negative consequence that the "mail" base can't be created
    via JS. Probably should fix that.

    ---
    ■ Synchronet ■ Vertrauen ■ Home of Synchronet ■ [vert/cvs/bbs].synchro.net
  • From Rob Swindell@VERT to Git commit to main/sbbs/master on Thu Apr 21 22:09:52 2022
    https://gitlab.synchro.net/main/sbbs/-/commit/dc4b1bd9350a5581fa410c7f
    Modified Files:
    src/sbbs3/js_msgbase.c
    Log Message:
    Use smb_open_sub() for the "mail" base too

    This restores the ability for JS MsgBase() to be used to create the
    initial mail message base properly, if needed.

    This means that the 'subnum' should now be equal to scfg.total_subs
    when referencing an arbitrary SMB via path (not in the configuration).

    ---
    ■ Synchronet ■ Vertrauen ■ Home of Synchronet ■ [vert/cvs/bbs].synchro.net
  • From Rob Swindell@VERT to Git commit to main/sbbs/master on Sun May 8 11:31:19 2022
    https://gitlab.synchro.net/main/sbbs/-/commit/323ff1e8198df77405409ab2
    Modified Files:
    src/sbbs3/js_msgbase.c
    Log Message:
    Remember the last 'first_msg' property value after msgbase is closed

    The other msgbase property values are stored in the smb.status or other private_t members which retain their value when the message base is closed, unlike the 'first_msg' property which required a read of the message base index to get the value (and that doesn't work when the message base is closed, so would return 0).

    for deon (ALTERANT)

    ---
    ■ Synchronet ■ Vertrauen ■ Home of Synchronet ■ [vert/cvs/bbs].synchro.net
  • From Rob Swindell@VERT to Git commit to main/sbbs/master on Sat Nov 19 17:02:14 2022
    https://gitlab.synchro.net/main/sbbs/-/commit/6c5cb01c0979e74332c314e4
    Modified Files:
    src/sbbs3/js_msgbase.c
    Log Message:
    Fix return return value when methods auto-open a message base (e.g. save_msg())

    js_open() sets the rval for the context (e.g. to JSVAL_TRUE), so we need to set it back to JSVAL_FALSE for failure conditions. Otherwise, the methods always return true even upon (save-msg) failure.

    ---
    ■ Synchronet ■ Vertrauen ■ Home of Synchronet ■ [vert/cvs/bbs].synchro.net
  • From Rob Swindell (on Windows)@VERT to Git commit to main/sbbs/master on Wed Mar 29 12:52:05 2023
    https://gitlab.synchro.net/main/sbbs/-/commit/fe14b001e563ea3b10c82cbf
    Modified Files:
    src/sbbs3/js_msgbase.c
    Log Message:
    MsgBase.save_msg() throw an exception when an empty recipient list is provided

    ... rather than just return false.

    This will make debugging this type of issue much easier in the future. sendmail.js was allowing empty recipient_list array arguments and the MsgBase .status was 0 and .error just an emtpy string - unhelpful.

    ---
    ■ Synchronet ■ Vertrauen ■ Home of Synchronet ■ [vert/cvs/bbs].synchro.net
  • From Rob Swindell (on Windows)@VERT to Git commit to main/sbbs/master on Sun May 7 23:22:44 2023
    https://gitlab.synchro.net/main/sbbs/-/commit/d5e8981d0631d766b37a061f
    Modified Files:
    src/sbbs3/js_msgbase.c
    Log Message:
    MsgBase.save_msg() docs says only one argument is required

    So use js_argc() to report an error if there's fewer than 1 argument, but
    don't just fail silently when 2 arguments are provided.

    ---
    ■ Synchronet ■ Vertrauen ■ Home of Synchronet ■ [vert/cvs/bbs].synchro.net
  • From Rob Swindell (on Windows)@VERT to Git commit to main/sbbs/master on Mon May 8 18:07:50 2023
    https://gitlab.synchro.net/main/sbbs/-/commit/de41e1b7a314ceaacfb6c321
    Modified Files:
    src/sbbs3/js_msgbase.c
    Log Message:
    Use js_argc() to generate the helpful exception when insufficient args used

    ... rather than just failing silently with a special return value
    (e.g. false).

    ---
    ■ Synchronet ■ Vertrauen ■ Home of Synchronet ■ [vert/cvs/bbs].synchro.net
  • From Rob Swindell (on Windows 11)@VERT to Git commit to main/sbbs/master on Wed Dec 13 19:11:22 2023
    https://gitlab.synchro.net/main/sbbs/-/commit/33e1817edbda217eb5d23cbb
    Modified Files:
    src/sbbs3/js_msgbase.c
    Log Message:
    Log the number of bytes that were attempted to be allocated

    ... in malloc error reporting messages

    ---
    ■ Synchronet ■ Vertrauen ■ Home of Synchronet ■ [vert/cvs/bbs].synchro.net
  • From Rob Swindell (on Windows 11)@VERT to Git commit to main/sbbs/master on Sat Mar 2 16:15:48 2024
    https://gitlab.synchro.net/main/sbbs/-/commit/82b9cbe85972cfdbd1ff5255
    Modified Files:
    src/sbbs3/js_msgbase.c
    Log Message:
    More use of JS_ValueToECMAUint32 in place of JS_ValueToInt32

    To support the full 32-bit range for things like dates/times, and message numbers (!).

    This should fix issue #732

    Though dates beyond Feb 7 2106 are definitely going to still be an issue. I'll definitley look into solving that by the the 2100.

    ---
    ■ Synchronet ■ Vertrauen ■ Home of Synchronet ■ [vert/cvs/bbs].synchro.net