Skip to content
Snippets Groups Projects
  1. Jan 31, 2025
    • Rob Swindell's avatar
      Better duplicate "key value" detection/rejection for configuration settings · 5d418517
      Rob Swindell authored
      Internal codes are always treated as keys (in a database sense) and should be
      unique, but they weren't always enforced to be unique in SCFG. There's still
      a few config items with internal codes that aren't forced unique (e.g. chat
      channels).
      
      File Library short names and Mesage Group short names are also key values and
      must be unique and that's now enforced as well.
      
      Remove the default name for new File Libraries and Message Groups (which are
      likely duplicate anyway).
      5d418517
  2. Jan 27, 2025
    • Deucе's avatar
      Fix all the "Not in request" assertions with debug JS · 2139bb5e
      Deucе authored
      This still appears to not fix valgrind on FreeBSD. :(
      The background thread thing is interesting though because there's
      an implication that the thread ID matters to GC in the assertion,
      and we were very sloppy about requests in there.
      2139bb5e
  3. Jan 21, 2025
  4. Jan 20, 2025
  5. Jan 18, 2025
  6. Jan 14, 2025
  7. Jan 11, 2025
  8. Jan 05, 2025
  9. Oct 15, 2024
  10. Jun 10, 2024
    • Rob Swindell's avatar
      Make legacy/alias properties non-enumerable: computer, modem · 3a029fa8
      Rob Swindell authored
      I noticed these redundant properties were being logged for every logon in
      logon.jsonl. We don't need these properties separately enumerable, and really
      they shouldn't be used anyway.
      
      computer is an alias of host_name
      modem is an alias of connection
      3a029fa8
  11. Jan 20, 2024
    • Rob Swindell's avatar
      The great BOOL->bool conversion in xpdev · 118984e9
      Rob Swindell authored
      Still using BOOL where we need Win32 API compatibility.
      Using JSBool instead of BOOL or bool where it matters.
      Changed most relevant TRUE/FALSE to true/false too (though it's not as critical).
      
      You shouldn't need to #include <stdbool.h> anywhere now - gen_defs.h should do that automatically/correctly based on the language/version/tool. In C23, stdbool.h isn't even needed for bool/true/false definitions (they're keywords), so we don't bother including stdbool.h in that case.
      Microsoft didn't define __STDC_VERSION__ in their older tool chains (even though they were C99 compatible and had stdbool.h), so we use a _MSC_VER check to know that there's a stdbool.h we should use in that case.
      
      For other/old compilers (e.g. Borland C) we #define bool/true/false following the pattern of stdbool.h (doesn't use a typedef).
      
      I didn't convert UIFC yet.
      
      This addresses issue #698
      118984e9
  12. Dec 31, 2023
  13. Dec 29, 2023
  14. Nov 07, 2023
    • Rob Swindell's avatar
      JSDOC build cleanup (used to generate jsobjs.html) · 96019606
      Rob Swindell authored
      Replaced _property_ver_list (array of numbers) with _property_ver_list (array
      of objects) with a "ver" and (optional) "desc" property. This solves the
      enumeration order problem with objects that have both manual and table-based
      properties. Object's property tables (arrays of jsSyncPropertySpec) can now
      (optionally) contain the property descriptions. For properties defined in this
      manner, there will never be another mismatch between ther name/type and
      description/version in the jsobjs.html (a problem has re-occurred several
      times through the years with nebulous work-arounds).
      
      We still use _property_desc_list arrays for additional (e.g. manually defined)
      properties in such objects or just objects that only use one method of
      property definition and are not subject to the enumeration order problem.
      
      Fixed numerous typos.
      
      Using more consistent terminology and HTML mark-up.
      
      Some beautification and enhancement of readability, but nothing too major.
      96019606
  15. Oct 26, 2023
    • Rob Swindell's avatar
      Initial support or multiple (user-selectable) languages in the terminal server · 35042374
      Rob Swindell authored
      Uses the new ctrl/text.??.ini files (just a few words translated so far).
      Adds the new "lang" user property (to user.tab and JS User class).
      The language code is the 2-3 char (e.g. ISO 639-1) abbreviation of a language.
      A "blank" language property value (the default), just means to use the
      ctrl/text.dat contents.
      User-selected alternate language file is loaded upon logon and in the
      built-in/hard-coded user default settings menu.
      More on the user default settings menu:
      - AutoLogin via IP option ('I') to make room for new (I) Language option.
      - The cold-keys menu option was removed to make room for Language option
        (via text.dat change to UserDefaultsHotKey)
      - Any options disabled via blank text.dat strings will no longer result in
        supported command keys (that could accidentally be struck with hidden
        consequences/effect)
      - The user_settings.js will need similar treatment
      
      text/menu/<lang>/* is where alternate language menu files should be stored
      
      New UserDefaultsLanguage text.dat string (inserted before new PasswordChar
      string).
      35042374
  16. Sep 12, 2023
    • Rob Swindell's avatar
      Allow JS 'user.editor' and '.shell' to be set for non-users (e.g. user #0) · c0370d3c
      Rob Swindell authored
      The request from Nightfox and Accession via DOVE-Net was to be able to set
      a user's external editor even if there's no user logged-in.
      
      These 2 user class properties in the JS object model were a bit special in
      that they *only* wrote to the user database and did not immediately modify
      the in-memory copy of the user_t structure, depending on the re-reading of
      the user.dat/tab file to re-populate the current user_t structure when needed.
      This didn't work if the current user is user #0 (no user).
      
      So, set the current user_t.xedit and user_t.shell accordingly whenever those
      JS properties are assigned a value (a string, the appropriate internal code).
      c0370d3c
  17. Jun 10, 2023
  18. Jun 09, 2023
    • Rob Swindell's avatar
      <Deuce> ... billion-and-one result of comparison of constant 100000 warnings. · 2b087b8b
      Rob Swindell authored
      So Clang-FreeBSD was warning (in compiles of scfg/scfg*.c by Deuce):
      result of comparison of constant 100000 with expression of type 'uint16_t'
      (aka 'unsigned short') is always true
      
      Why? Cause a uint16_t's max value is 65535 (less than 100000). Sure we could
      have just lowered the UIFC max number of config items to 65535, but that would
      have been too easy. And why are these compared-with values of type uint16_t to
      begin with? Because most ctrl/*.cnf lists (of configuration items) were
      limited to 65535 entries cause ... 16-bit DOS, historically. Now that *.cnf
      files aren't used, we could just increase these scfg_t.*_total type sizes from
      16 to 32-bits, yeah? The result is this commit.
      
      I went to (signed) int so we could still keep -1 as the special illegal
      sub/dir num value (e.g. INVALID_SUB, which is sometimes used to indicate the
      email message base). Theoretically, 2 billion configuration items could be
      supported in these lists, but SCFG will limit you to 100000 anyway. So there's
      a whole lot of s/uint/int in this commit.
      
      I'd be very surprised if this doesn't result in some new GCC/Clang warnings,
      but at least the old "comparison of constant 100000" warnings are now gone!
      2b087b8b
  19. May 27, 2023
  20. May 25, 2023
  21. Mar 14, 2023
  22. Mar 05, 2023
    • Rob Swindell's avatar
      Add user_t.mail (in JS, user.mail_settings) to remember mail preferences · cf0d5714
      Rob Swindell authored
      Right now, the only preference is reverse mail listings (oldest first
      or newest first). These settings are only used when reading "your mail",
      not any other kind of mail reading.
      
      bbs.read_mail() now returns the user-adjusted loadmail_mode value and
      this allows us to determine the user's preferences and save them after
      this function/method is called. A readmail_mod can now return a number
      (other than 0) and that will be used as the return value of this method.
      
      sbbs_t::readmail() now does the adjustment of the passed lm_mode before
      calling any installed readmail_mod, so if for example, deleted message
      viewing is enabled by the sysop, those LM_* flags might be set now in
      the argument to the readmail_mod, wherase they never would before.
      
      There is not yet any way for the sysop to set a new user's default
      mail_settings, they'll just default to 0 for now.
      
      email_sec.js will get some adjustments to use/store the
      user.mail_settings next.
      cf0d5714
  23. Mar 03, 2023
    • Rob Swindell's avatar
      Introduced user download_cps property · c27b78a9
      Rob Swindell authored
      Will track the user's last succsesful file-download transfer rate
      in characters (bytes) per second.
      
      I'm not calculating or storing this rate yet, but will be soon. This
      will make the file download ETAs more realistic and no longer
      hard-coded to 3000 cps (which now defaults to 10000 cps, to keep up
      with the times).
      
      New field added to user.tab placed adjacent to the other File xfer stats,
      which means the leech attempt counter (likely always 0) was moved to the end
      of the user record.
      c27b78a9
  24. Feb 27, 2023
  25. Oct 20, 2022
  26. Oct 18, 2022
    • Rob Swindell's avatar
      Full read/write support of new user.tab userbase file · 8a22b246
      Rob Swindell authored
      Also resolved some 32 vs 64-bit 'long' issues/ambiguities that have long-remained. :-)
      
      This commit also removes logon.lst file support.
      
      There's a TODO block remaining in js_user.c for setting portions of a user's birthdate (e.g. just the year or month or day).
      8a22b246
  27. Jun 11, 2022
    • Rob Swindell's avatar
      Add User close() method · 3a5609f3
      Rob Swindell authored
      This can be used to force a close of the user.dat file, if open. Rather than
      waiting for an out of scope User to get garbage-collected, this method could
      be used to force a close of the user.dat file, if it's open.
      3a5609f3
  28. Jun 01, 2022
    • Rob Swindell's avatar
      Don't clobber an open user.dat file descriptor in js_CreateUserObject() · 792237df
      Rob Swindell authored
      Likely fix for the user.dat open file descriptor leak:
      If js_CreateUserObject(cx,parent,cfg,"name",...) is called multiple times
      (e.g. before login and after login), the successive calls will reuse the
      previously allocated JS object and allocated private data memory. However, the
      private data memory (which includes the descriptor of an open user.dat file,
      if it has been opened), was always zeroed, even if it was being reused. This
      would leak open file descriptor.
      
      So any (pre)login scripts or web scripts that use the "user" object (which
      is all zeroed-out before login) and then allows a user to subsequently login,
      would leak a file descriptor.
      792237df
  29. May 18, 2022
    • Rob Swindell's avatar
      Fix User.number increment beyond lastuser issue · af1ae777
      Rob Swindell authored
      When the 'number' property of an instance of User was incremented beyond the last user, the call to fgetuserdat() on subsequent property 'get' operation would fail and zero-out the user structure (including the user number). This resulted in an infinite loop in load/birthdays.js where the user number would go from lastuser to 1 in one operation (u.number++).
      
      Reported by DesotoFireflite (VALHALLA)
      af1ae777
  30. Mar 24, 2022
    • Rob Swindell's avatar
      Support user credits and transfer stats > 4GB in total · 2d4ec7b8
      Rob Swindell authored
      Credits and daily free credits are accurate to the byte up to (a maximum) of 18446744073709551615 (that's 18 Exbibytes - 1).
      
      User's upload and download byte stats are now similarly extended in maximum range, but the accuracy is only "to the byte" for values less than 10,000,000,000. Beyond that value, the accuracy declines, but is generally pretty damn accurate (to 4 decimal places beyond the nearest multiple of a power of 1024), so I don't expect that to be an issue. This method of storing upload/download byte stats allowed me to use the same 10-character user record fields in the user.dat file.
      
      As a side-effect of this enhancements:
      * User and file credit values are now expressed in multiples of powers of 1024 (e.g. 4.0G rather than 4,294,967,296).
      * Free credits per day per security level has now been extended from 32 to 64-bits (to accommodate values >= 4GB).
      * adjustuserrec() now longer takes the record length since we can easily determine that automatically and don't need more "sources of truth" that can be out-of-sync (e.g. the U_CDT field length going from 10 to 20 chars with this change).
      * setting the stage for locale-dependent thousands-separators (e.g. space instead of comma) - currently still hard-coded to comma
      * more/better support for files > 4GB in size (e.g. in the batch download queue)
      * user_t ulong fields changed to either uint32_t or uint64_t - I didn't realize how many long/ulong's remained in the code (which are sometmies 32-bit, sometimes 64-bit) - ugh
      * Steve's ultoac() function renamed to u32toac() and created a C++ wrapper that still uses the old name, for homage
      2d4ec7b8
  31. Feb 05, 2022
  32. Jan 28, 2022
    • Rob Swindell's avatar
      Use sbbs.ini [web] FileVPathPrefix to configure web filebase prefix · bfe32c7a
      Rob Swindell authored
      It bothered Deuce having a web server setting in scfg_t/SCFG->File Options, so I moved this setting to [web_]startup_t and the sbbs.ini file.
      
      The downside is that file_area.web_file_prefix is no longer available to JS environments outside of the web server and terminal server, but meh, probably not going to use it elsewhere anyway? I can imagine use cases for JSexec scripts to want to generate URLs to filebase files. If that ends up being a need, they'll have to find and parse the "right" sbbs.ini file to determine the vpath prefix. 
      bfe32c7a
  33. Apr 04, 2021
  34. Dec 09, 2020
    • Rob Swindell's avatar
      Make read/unread mail-waiting stats easier to access · fee51099
      Rob Swindell authored
      New JS User.stats properties:
      - read_mail_waiting
      - unread_mail_waiting
      - spam_waiting
      
      New @-codes:
      - MAILR (read mail waiting)
      - MAILU (unread mail waiting)
      
      And the corresponding MAILR# and MAILU# codes (for non-current user's stats).
      
      Addresses feature request #191.
      fee51099
  35. Oct 25, 2020
    • Rob Swindell's avatar
      Support manual terminal columns setting per user · cb442b53
      Rob Swindell authored
      The default terminal columns (still 0/auto) can be overridden with the 'L' command from the user defaults menu. 
      
      Also increased maximum manual terminal rows setting from 99 to 999 - this involved moving the record in user.dat, though the old record value is auto-migrated.
      cb442b53
Loading