Skip to content
Snippets Groups Projects
  1. Jan 14, 2025
    • Rob Swindell's avatar
      First pass run of uncrustify (code beautification) · 45c8fa94
      Rob Swindell authored
      White-space changes only, exception being the rare insertion of NL before
      closing brace (couldn't find the option to disable that behavior).
      
      I excluded some header files (e.g. sbbs.h) since uncrustify seemed to be doing
      more harm than good there. I might just end up applying different set of rules
      to .h files.
      45c8fa94
  2. Jan 13, 2025
  3. Dec 19, 2024
    • Rob Swindell's avatar
      Add "Auto" Local Time Zone option and make that the default for new install · 5434b904
      Rob Swindell authored
      As Deon pointed out in DOVE-Net / Synchronet Discussion, having a local time
      zone configured with a different UTC offset than your system time zone can
      produce strange/unexpected results (e.g. displayed age of messages). Since
      it's possible that not all sysops will complete the configuration wizard or
      actually set their timezone to the correct value (and ignore the startup
      warning message), we now make the default Local Time Zone to be
      "automatic" - query the OS every time the local time zone is needed/used.
      
      This has the downside of only storing (e.g. in message headers) the UTC
      offset of the current time zone (not the time zone abbreviation/name as
      encoded by SMB). I considered making an option to dynamically figure out
      the actual time zone (not just the UTC offset) and while I think that's
      doable, Deon just wanted his UTC offset (e.g. UTC+11:00) and not his
      time zone name (e.g. AEDT) stored in message headers, so this setting
      w...
      5434b904
  4. Dec 08, 2024
    • Rob Swindell's avatar
      Overhaul how custom Node actions and status strings are handled · d116f362
      Rob Swindell authored
      Custom NodeStatus and NodeAction/Activity strings are now displayed pretty
      much everywhere possible (except the node utility, since it doesn't read
      any configuration files). This fixes issue #618, finally.
      
      If you have custom (non-blank) NodeAction* strings in your text.dat/text.ini
      file, or you change these strings during runtime (e.g. using bbs.replace_text)
      this will impact you:
      - do not include the user name or any other fields normally included in
        printed node status in your string - just the customized node action and
        really, you should only use/override these strings for dynamically changing
        node status (i.e. you're using NodeActionCustom and you're setting different
        custom strings depending on current node activity). Consider using the new
        NodeActivity* text.dat strings instead if your customized string doesn't
        change during run-time.
      - don't use the %s/%u/%d specifiers any more - use @-codes instead, if needed
      
      If you want static/permanent node action strings, set new new NodeActivity*
      strings in your text.dat or (preferrbaly) text.ini file instead.
      This means the node actions can now be localized for other languagues!
      
      I'm still using the node.exb file (I did consider alternatives, e.g.
      node.ini or node*/activity.asc), but decided to postpone such a change.
      The node.exb file is still used, but the strings represent just the custom
      (extended) node *activity* and not the entire node status string.
      
      Use of Ctrl-A codes needs to be considered/accounted-for (currently isn't).
      d116f362
  5. Dec 02, 2024
  6. Nov 01, 2024
  7. Oct 31, 2024
    • Rob Swindell's avatar
      dstrtounix() now takes the format (enum date_fmt) directly · 15613b0d
      Rob Swindell authored
      This allows us to use dstrtounix() for MM/DD/YY dates regardless of the system
      configuration (sysop/locale preference).
      
      This fixes issue with QWK route.dat file and door.sys (expiration date)
      parsing where the date is/has-to-be in MM/DD/YY format, always.
      15613b0d
  8. Oct 29, 2024
    • Rob Swindell's avatar
      Add option to display short dates in verbal/unambiguous formats · a893b66f
      Rob Swindell authored
      Although we've added (in SBBS v3.20) configurable numeric date input/display
      formats for the system, the output was still ambiguous for users (e.g.
      NN/NN/NN which could be interpretted a number of ways), so I've added an option
      to choose "verbal" short date formats to be displayed where possible instead.
      The same value separate from the numeric format (whatever the sysop chose) is
      used in the verbal date output, but since month name abbreviations are 3
      characters, only one separator is used (to keep the output length fixed at 8
      characters).
      
      The new "Verbal" short date display format is choosable in the SCFG wizard and
      via SCFG->System->Short Date Format.
      a893b66f
    • Rob Swindell's avatar
      Support string (text.dat string ID) arguments to bbs.text() and system.text() · 2394d15a
      Rob Swindell authored
      Currently, this is a slower way to look-up a text.dat string, but requires no
      load/require of text.js and allows for a shorter syntax to get a text.dat
      string, i.e. bbs.text("Quit") instead of bbs.text(bbs.text.Quit);
      
      Although the bbs.text() ID lookup is cached, it's only marginally faster than
      system.text() ID lookup, which is not cached and about 1/3 the speed of the
      other methods of index to string lookup (in the MSVC-Windows build).
      2394d15a
  9. Sep 06, 2024
  10. Aug 08, 2024
    • Rob Swindell's avatar
      Prevent NULL pointer dereference when 'null' object passed to JS functions · 54523145
      Rob Swindell authored
      As was discovered as part of investigation into issue #769, a JavaScript
      could crash SBBS (cause a segfault) due to a NULL pointer dereference when
      the script passes 'null' to native JS functions where an object is expected.
      
      The issue raised was with console.gotoxy(), but it turns out that *many*
      Synchronet native JS functions would call JSVAL_TO_OBJECT() and then, without
      checking for NULL/nullptr, pass its return value to JS api functions such as
      JS_GetPrivate, JS_GetProperty, JS_GetClass, JS_ObjectIsFunction,
      JS_IsArrayObject, JS_GetArrayLength, JS_DefineProperty, JS_Enumerate, etc.
      All of these JS API functions dereference the passed object pointer without
      NULL/nullptr checking.
      
      The fix here is to either call JSVAL_IS_NULL() or JSVAL_NULL_OR_VOID() and
      if true, not call JSVAL_TO_OBJECT() and/or check the return value for the NULL
      value before using as an argument to any other JS API functions.
      54523145
  11. May 16, 2024
  12. Apr 08, 2024
  13. Apr 06, 2024
    • Rob Swindell's avatar
      Introduce system.git_time · bf772802
      Rob Swindell authored
      This is the time_t (seconds since Unix epoch, Jan-1-1970 UTC) date/time of the
      current (most recent) Git commit used to build the running binary.
      
      If a JS developer wants to check if a build is recent-enough to include some
      change, this is the property they should use to check (with >= comparison).
      bf772802
  14. Mar 07, 2024
  15. Feb 14, 2024
  16. Dec 31, 2023
  17. Dec 29, 2023
  18. Dec 18, 2023
  19. Dec 17, 2023
    • Rob Swindell's avatar
      Add support for metadata in *.can (filter) files · 2af212db
      Rob Swindell authored
      I wanted a couple of features for filters (e.g. blocked IP addreses):
      - expiration date, optionally (only block for a limited time)
      - display details of reason for filter in log messages (at time of block)
      
      I've been thinking for some time that these files should be converted to .ini,
      but then it occurred to me that I could do a sort of hybrid where the metadata
      was key/value pairs tab-delimited from the search-pattern (first text on the
      line). This is backward comaptible, relatively easy to view/edit by hand, and
      extensible (easy to add/remove metadata fields in the future). So they'll
      remain as text/*.can files.
      
      The maximum line length for findstr/trashcan parsed files extended from 255 to
      1000 characters.
      
      Moved all trashcan-related functions from scfglib1.c to (new file) trash.c.
      
      For the first time, I actually tested a build on WSL *before* committing to
      Git. So, this *should* pass CI the first time. :-O
      2af212db
  20. 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
  21. Sep 26, 2023
    • Rob Swindell's avatar
      Fast text.dat string references, more localization support via JS and @-codes · 9fb7c2c3
      Rob Swindell authored
      sbbs_t::mnemonics() now supports @-codes immediately following the tilde
      (e.g. ~@Yes@) to use the first character of a dynamically-replaced
      (e.g. localized/translated) text string as a command key.
      Fixed issue in sbbs_t::mnemonics if multiple @-codes were specified in the
      string, but no space characters (just noticed this bug while reviewing).
      
      Created: sbbs_t::expand_atcodes() - used by sbbs_t::mnemonics(), exposed in
      JS as bbs.expand_atcodes().
      
      bbs.text and system.text now have properties: each text string ID is the
      property name and the text index number (1-based) is the property value -
      enabling fast text string lookup without load/require text.js
      
      Constified sbbs_t::atcode() and attrstr() - not too painful
      
      Deprecated YNQP text.dat string in favor of (the first character of)
        "Yes" and "No" text strings and new strings: "Quit", and "PasswordChar"
      
      Other text.dat changes: ListKey->List, AllKey->Unused853
      More new text.dat strings: Which, Next, Previous, Language, LANG
      Deprecate the "AllKey" text string
      Create/use sbbs_t::all_key() - first character of "All" text string
      
      New JS console properties that present common (possibly localized) command
      keys: yes_key, no_key, quit_key, all_key, list_key, next_key, prev_key
      9fb7c2c3
  22. 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
  23. May 27, 2023
  24. May 25, 2023
  25. May 20, 2023
  26. Apr 24, 2023
  27. Mar 16, 2023
  28. Mar 14, 2023
  29. Feb 12, 2023
  30. Feb 09, 2023
    • Rob Swindell's avatar
      Allow system.matchuserdata() to search deleted user records · e61eb77b
      Rob Swindell authored
      Insert an optional boolean argument to enable a search through deleted and
      inactive user records (in addition to active user records). This is part of
      the solution to the problem described in issue #513 where the UEDIT sysop
      command did not go to a specified user (by alias) automatically, presumably
      because the user record was marked as deleted.
      e61eb77b
  31. Dec 30, 2022
    • Rob Swindell's avatar
      Resolve unused variable warning introduced in previous commit · 692f95e4
      Rob Swindell authored
      Some trailing whitespace clean-up too.
      692f95e4
    • Rob Swindell's avatar
      Add JS system.find_login_id() method · d37d1380
      Rob Swindell authored
      d37d1380
    • Rob Swindell's avatar
      Common login control (e.g. via real name) using new find_login_id() function · 7679dcf8
      Rob Swindell authored
      Previously, many servers and services didn't support login by real name
      (e.g. issue #469) even if the sysop had that option enabled in SCFG.
      
      Move login control settings from node.ini to system (main.ini -> login)
      
      The 3 node toggle options:
      - Allow Login by User Number
      - Allow Login by Real Name
      - Always Prompt for Password
      
      ... have been now moved from SCFG->Nodes->Node x->Toggle Options to
      SCFG-System->Toggle Options.
      
      If you upgraded to v3.20a before now, you'll want to double-check these
      settings to make sure they're how you want them set. New upgraders that run
      upgrade_to_v320.js (e.g. via 'jsexec update') will get these settings migrated
      automatically.
      
      Added some error detection/logging to upgrade_to_v320.js when failing to open
      .cnf files.
      
      Constified some more user/login related function args and return types.
      7679dcf8
  32. Dec 23, 2022
  33. Nov 12, 2022
  34. Oct 29, 2022
  35. 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
Loading