1. 21 Mar, 2022 1 commit
    • Rob Swindell's avatar
      SMB items (messages or files) can now have 32-bit or 64-bit cost value · 9db7a614
      Rob Swindell authored
      To fully support files > 4GB in size in file bases, credit values larger than 32-bits must be supported too.
      
      There's a couple of todo comments/items included in this commit, but that's mainly to do with messages (which don't really have costs anyway).
      
      The main thing to deal with now is the fact that users can't have more than 4GB in credits in the first place! That's got to be fixed next.
      9db7a614
  2. 03 Mar, 2022 1 commit
  3. 20 Jan, 2022 1 commit
    • Rob Swindell's avatar
      Add JS methods for vetting filenames (e.g. for upload by users) · c94fbb2b
      Rob Swindell authored
      system.illegal_filename() - check if contains illegal chars/sequences
      system.safest_filename() - check if contains only safest chars
      system.allowed_filename() - check if meets criteria from SCFG->File Options
      system.check_filename() - check if legal and meets configured criteria and is not in file.can
      bbs.check_filename() - ditto, except will display badfile.msg as appropriate
      
      Now scripts can utilize the sysop-controlled filename criteria and security of the BBS.
      c94fbb2b
  4. 02 Jan, 2022 1 commit
  5. 30 Dec, 2021 1 commit
  6. 28 May, 2021 1 commit
    • Rob Swindell's avatar
      Add bbs.export_filelist() method · 536b7e22
      Rob Swindell authored
      This is the last thing needed to complete the new temp/archive menu module implemented in JavaScript for v3.19.
      
      File list generation can easily be done in JS (see filelist.js for example), but since we have this function already in C++ (i.e. for including filelists in QWK packets) - might as well make it available for use in JS.
      536b7e22
  7. 27 May, 2021 1 commit
  8. 04 Apr, 2021 2 commits
  9. 15 Feb, 2021 5 commits
  10. 25 Dec, 2020 1 commit
  11. 20 Dec, 2020 1 commit
  12. 01 Dec, 2020 1 commit
  13. 06 Nov, 2020 1 commit
    • Rob Swindell's avatar
      Replace ctype.h function calls with new MSVC-safe XPDEV macros · 8a7b7308
      Rob Swindell authored
      I'm fed-up with MSVC assertions in ctype functions (e.g. isdigit, isprint, isspace, etc.) when called with out-of-range (e.g. negative) values.
      
      This problem only affects MSVC debug builds, but if you run them (like I do), these things are like little time bombs that can drive you crazy (knocking your board out of service).
      
      The new macros names are bit more descriptive as well.
      8a7b7308
  14. 19 Sep, 2020 1 commit
  15. 16 Aug, 2020 1 commit
  16. 26 May, 2020 2 commits
  17. 14 May, 2020 1 commit
    • rswindell's avatar
      No longer dynamically allocate compiled access requirment (AR) strings for configuration items. · 110cc8ac
      rswindell authored
      SCFG for Win32 is linked against a load_cfg lib that builds withOUT SCFG defined, so these compiled AR elements were allocated and then many SCFG operations (e.g. copy/paste, create new) would copy the allocated ARs to another configuration and then be subjected to double-free upon exit/clean-up (resulting in exception or crash).
      Just get rid of this cruft and some other related RAM-byte-saving hold-overs from the MS-DOS days.
      110cc8ac
  18. 30 Apr, 2020 1 commit
    • rswindell's avatar
      Support JavaScript property name expansion using JS:<name> @-code where name is · c9c42c87
      rswindell authored
      the name of a scalar property in either the current scope (by default) or the
      scope of the object passed to:
      - bbs.menu()
      - console.putmsg()
      - console.printfile()
      - console.printtail()
      
      The 'name' cannot be an array element (e.g. myprop[0]) or a nested object
      reference (e.g. myobj.myprop): just a single property name that can be
      converted to a string.
      
      Also, bbs.menu() now accepts an optional print-mode argument (default: P_NONE).
      c9c42c87
  19. 24 Apr, 2020 2 commits
  20. 23 Apr, 2020 1 commit
    • rswindell's avatar
      2 more configurable loadable modules: · 5a192c0e
      rswindell authored
      - external programs section (default: "xtrn_sec")
      - logon list (default: "logonlist")
      
      This ties the Baja XTRN_SECTION and USERLIST_LOGONS functions and the
      JS bbs.xtrn_sec() and bbs.list_logons() methods to the loadable modules (if
      configured) automatically without the exec_bin hackery in *.src.
      
      Also, allow the xtrn section argument to be passed to the JS/C++ method to
      go directly to a specific xtrn program section.
      
      The bbs.list_logons() can also accept an argument to pass to the module
      (e.g. "-y" for yesterday's logons).
      5a192c0e
  21. 09 Apr, 2020 1 commit
    • rswindell's avatar
      Call the listmsgs_mod (List msgs module) when the bbs.list_msgs() method · 828dea3f
      rswindell authored
      is called without a "mode" specified. This uses the new default SCAN_INDEX
      mode. If you need the old behavior (does not invoke the listmsgs_mod), specify
      a different mode value (e.g. SCAN_READ). All of the mode values (other than
      SCAN_INDEX) will not start the list message module, but rather use the internal
      C++ logic.
      This provides an intuitive way to actually invoke the list messages module
      from JS without hard-coding bbs.exec("?module") into a cmd shell, for example.
      828dea3f
  22. 20 Mar, 2020 1 commit
  23. 01 Mar, 2020 1 commit
  24. 10 Jan, 2020 1 commit
  25. 02 Aug, 2019 1 commit
  26. 16 Jul, 2019 1 commit
  27. 04 May, 2019 2 commits
    • rswindell's avatar
      Resolved GCC error: 'js_bbs_class' was declared 'extern' and later 'static' · efb81b98
      rswindell authored
      MSVC had no problem with this. <sigh>
      efb81b98
    • rswindell's avatar
      Define and use a wrapper for JS_GetInstancePrivate(): js_GetClassPrivate() · 6f83c4ff
      rswindell authored
      Use this in place of JS_GetPrivate() in native class methods that need the
      class instance's private data pointer and will do bad things if that pointer
      points to something other than what is expected. mcmlxxix (matt) discovered
      that using Object.apply(), you can invoke class methods where the 'this'
      instance is a different class. This would result in
      "Internal Error: No Private Data." or a crash.
      So now, gracefully detect this condition and report a meaningful error:
      "'<class-name>' instance: No Private Data or Class Mismatch"
      
      Also, important to note: if the method uses JS_THIS_OBJECT to get the JSObject*
      to pass to JS_Get*Private, then it must do this *before* it calls JS_SET_RVAL.
      
      From jsapi.h:
       * NB: there is an anti-dependency between JS_CALLEE and JS_SET_RVAL: native
       * methods that may inspect their callee must defer setting their return value
       * until after any such possible inspection. Otherwise the return value will be
       * inspected instead of the callee function object.
      
      The js_crypt*.c files still need this treatment.
      6f83c4ff
  28. 02 May, 2019 2 commits
    • rswindell's avatar
      @-code changes: · 0868c5d9
      rswindell authored
      Expanded codes will not *not* go beyond the terminal column width (minus 1).
      If you need the old/wrap behavior, add a "-W" modifier to your @-code.
      If a length value is specified with -W, it is ignored.
      
      - MSG_TO, MSG_FROM, MSG_SUBJECT now reflect the header values passed
        to sbbs_t::show_msghdr(), JS bbs.show_msg_header() and not necessarily the
        actual stored (e.g. MIME-encoded) header values.
      
      New codes:
      - MSG_CC - reflect a message's CC list, if it has one
      - DATETIMEZONE - combines DATETIME and TIMEZONE in one string
      0868c5d9
    • rswindell's avatar
      Support the passing of optional 'subject', 'from', and 'to' values to · 4fc5b9a5
      rswindell authored
      show_msghdr(), over-riding the values from the passed smbmsg_t. This is useful
      for, say, displaying MIME-decoded values rather than the MIME-encoded versions
      of the header fields that you often find in email today.
      4fc5b9a5
  29. 11 Apr, 2019 2 commits
  30. 10 Apr, 2019 1 commit