Skip to content
Snippets Groups Projects
  1. Jan 14, 2025
  2. Jan 05, 2025
  3. Dec 22, 2024
    • Rob Swindell's avatar
      Fix issue when receiving node messages while using down-arrow at pause prompt · e0931d6d
      Rob Swindell authored
      Hitting down-arrow key at a pause prompt normally displaye just one more line
      of the display text/file, but if you received a node message/telegram/notice
      after hitting down arrow, you'd get a screen full of text instead of just a
      single (one more) line, as you wanted.
      
      This looks to be because of the anti-recursive protection implemented in
      pause() - when it calls nodesync() after the key press, that displays
      node/user messages (if there are any) and if pause is called as a result
      (e.g. because the line counter was already set to cause a pause after the
      next line of output), it'd do nothing since that would be recursive. The fix
      is to simply set the line counter as a result of the down-arrow key press
      *after* the call to nodesync(), which might display multiple lines, but I
      think that's fine.
      e0931d6d
  4. Dec 01, 2024
    • Rob Swindell's avatar
      Simplify the getnode.cpp API - use bool returns, default paramaeter value · 62ed3d3a
      Rob Swindell authored
      getnodedat() now performs a non-locked read by default.
      
      Perform more checks of getnodedat() return value before calling putnodedat()
      to avoid unintentionally zeroing out node.dab records.
      
      Add/use unlocknodedat() method for unlocking a node.dab record without
      writing.
      
      Note: The userdat.c getnodedat() and putnodedat() still return int (i.e. 0 on
      success), so that can be confusing.
      62ed3d3a
  5. Oct 29, 2024
    • Rob Swindell's avatar
      Fix mnemonics bug introduced in commit b84c583a · 7b3873e5
      Rob Swindell authored
      We want to not expand tilde to attributes when there are any attribute codes
      in the mnemonics string. The existene of a non-attribute ctrl-a code should
      not have prevented the tilde expansion.
      
      Fix for issue #805 reported by Nelgin (thank you)
      7b3873e5
  6. Oct 23, 2024
  7. Aug 10, 2024
    • Rob Swindell's avatar
      Rename sbbs_t::ungetstr() and JS console.ungetstr() to ungetkeys() · 0d281709
      Rob Swindell authored
      ... since these methods only feed the keyboard buffer.
      
      Add an optional 'insert' argument to console.ungetkeys() - default is false
      (append).
      
      Add a new version of console.ungetstr() which feeds the passed characters
      directly to the receive input buffer. Now returns bool indicating success.
      Existing scripts (if any) that use console.ungetstr() should continue to work
      just fine.
      
      This is anticipation of telgate.js being able to stuff strings (e.g. username,
      password) into the input buffer and those chars/keys being passed to the
      remote (gatewayed) telnet server. Since the telnet gateway reads directly from
      the receive input buffer (ignoring the keyboard buffer), we needed a way to
      stuff strings of characters into the receive input buffer directly and that
      sort of exposed the weirdness of the existing console.ungetstr() method:
      - it didn't return a return value (not indication of failure)
      - it didn't support an 'insert' operation (even though the underlying C++
        method does)
      - it didn't use the sbbs_t method that already existed for feedding a string
        of characters into the input/keyboard buffer
      0d281709
  8. Aug 04, 2024
  9. Apr 28, 2024
  10. Apr 26, 2024
    • Rob Swindell's avatar
      Add MNE:<low>[:high][:cmd] @-code for mnemonic string attribute control · 8eef2dc8
      Rob Swindell authored
      The "default" mnemonic string attributes are still set in ctrl/attr.cfg,
      but now, each mnemonic string (e.g. from text.dat or passed to JS
      console.mnemonics()) can include a "MNE:" @-code to over-ride the default
      mnemonic string attributes (low, high, and command). If the "high"
      attribute isn't specified, it defaults to the same color as the "low"
      attribute with the "high intensity" flag flipped. The "cmd" attribute
      defaults to whatever was included in the attr.cfg, if not specified.
      Technically, the separator between the attributes can be any non-valid
      attribute character (e.g. symbol).
      
      Renamed (really old function) attrstr() to strtoattr() since its usage now
      more closely resembles other std C strto* functions (has an 'endptr' arg).
      8eef2dc8
  11. Mar 25, 2024
  12. Nov 22, 2023
    • Rob Swindell's avatar
      Fix CID 469138 · d08d028d
      Rob Swindell authored
      getkeys() is actually never (currently) called with a NULL arg, so this
      could not actually occur, but better to prepare for that eventuality.
      
      This looks like a case of not following the YAGNI principle.
      d08d028d
  13. 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
  14. May 06, 2023
  15. Mar 18, 2023
    • Rob Swindell's avatar
      Add terminal-client socket inactivity detection/disconnection · 53b26318
      Rob Swindell authored
      - New keys in [BBS] section of sbbs.ini:
        MaxLoginInactivity (default: 10 minutes)
        MaxNewUserInactivity (default: 60 minutes)
        MaxSessionInactivity (default: none/unlimited)
      - Each configured external program/door in SCFG can have its own maximum inactivity setting (or else the session max inactivity is applied)
      - moved node-specific sec_hangup to system-wide/shared max_getkey_inactivity (configured in SCFG->System->Advanced)
      - moved node-specific sec_warn (seconds of inactivity before sending warning) to inactivity_warn (a percentage of elapsed max inactivity before sending warning), also configured in SCFG->System->Advanced and used for both socket and getkey inactivity detection
      - Renamed JS console.inactivity_hangup to console.max_getkey_inactivity (old name remains as alias)
      - Renamed JS console.timeout to console.last_getkey_activity (old name remains as alias)
      - Removed JS console.inactivity_warning
      - Added JS console.max_socket_inactivity (current input_thread inactivity threshold)
      - New text.dat string: InactivityAlert (just contains 3 ^G/BELLs by default) used for non-visual inactive-user warning
      
      The MaxLoginInactivity setting in particular solves the problem of custom scripts (e.g. animated pause prompts) that just poll indefinitely for user input and never time-out  - these will no longer cause nodes to be tied-up with inactive/bot users at login.
      
      You may ask yourself, how did I get here? No, you may ask yourself: why configure these socket inactivity max values in sbbs.ini? The reason is consistency: sbbs.ini is where the MaxInactivity is configured for all the other TCP servers and services.
      
      This fixes issue #534 for Krueger in #synchronet
      53b26318
  16. Mar 14, 2023
    • Rob Swindell's avatar
      Enhance pause method flexibility (both C++ and JS) · 6865bdf3
      Rob Swindell authored
      sbbs_t::pause() and JS console.pause()...
      now excepts an optional set_abort argument (default is true) which controls whether this method will set the global console-output aborted flag (sys_status&SS_ABORT in C++, console.aborted in JS) when the user hits the Quit or No key at the pause prompt.
      
      This method now returns a bool: false if the user entered No, Quit, or Ctrl-C  at the pause prompt.
      
      Nothing makes use of either of these new pause() features yet, but its generally better to not set/rely on global state wherever possible.
      6865bdf3
  17. Mar 11, 2023
  18. Feb 19, 2023
    • Rob Swindell's avatar
      The great 'long int' purge of 2023 part 1 · 59d8974c
      Rob Swindell authored
      At one time, Synchronet was a 16-bit DOS project, plagued by the 16-bit [u]int, so long's were used everywhere > 16-bits were known to be needed/wanted (This is before the days of the standard sized types from stdint.h), and they've persisted.
      
      But '[u]long int' is 64-bits on *nix 64-bit builds, 32-bits everywhere else (even 64-bit Windows builds if/when we ever get around to that), so this could lead to insidious bugs that would only show up on one flavor or the other. Since [u]int is 32-bits on everything we currently support, we'll use that instead of [u]long.
      
      This "part 1" because I'm sure there's going to be warnings and errors from the GCC/Clang builds as a result, which I'll get to next.
      59d8974c
  19. Nov 18, 2021
    • Rob Swindell's avatar
      Add text.dat lines for "All" and the List key ('L'), used in quoting · 9513bdba
      Rob Swindell authored
      The internal line editor's quoting feature add some hard-coded strings ("Done" and "All") and the (L)ist key was hard-coded. Use the text.dat string (new and pre-existing) for these now.
      
      Also, use the new sbbs_t *_key() methods for referencing the configured key bindings (via text.dat) for these common key-stroke commands.
      Convert the text.dat strings for keys (e.g. YNQP) to uppercase always as well.
      9513bdba
  20. Nov 06, 2020
    • Rob Swindell's avatar
      Replace ctype.h function calls with new MSVC-safe XPDEV macros · ec20d959
      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.
      ec20d959
  21. Nov 05, 2020
  22. Sep 09, 2020
  23. Sep 05, 2020
  24. Sep 04, 2020
    • Rob Swindell's avatar
      Spinning cursors (10 patterns now) are configurable in text.dat · b5c1a605
      Rob Swindell authored
      Inspired by the cool progress cursor displayed by 'git-size', the spinning
      cursors in the Synchronet terminal server are now configurable via text.dat
      strings (SpinningCursor0 - 9), no maximum length.
      Increased the cursor "spin" rate from 4 to 5 times per second.
      The first character of the spin pattern is chosen at random between 0 and 4
      but the direction of increment is also from left to right.
      b5c1a605
  25. Aug 16, 2020
  26. May 24, 2020
  27. May 11, 2020
  28. May 09, 2020
    • rswindell's avatar
      By default, single-char hot-spots do not extend to the end of the row (use the... · ec56c63f
      rswindell authored
      By default, single-char hot-spots do not extend to the end of the row (use the "hungry" attribute to control behavior).
      ec56c63f
    • rswindell's avatar
      Both hungry/liberal hot-spots and strict hot-spots can be defined now, at the... · 6f16fafe
      rswindell authored
      Both hungry/liberal hot-spots and strict hot-spots can be defined now, at the same time. For Nelgin.
      Use ^A` to define a single-char strict hot-spot using Ctrl-A codes. Unfortunately, this usurps the "home" Ctrl-A code which nothing seems to use but has now been changed to ^A'.
      Use ` instead of ~ in mnemonics to define strict single-char hot-spots (also displays the cmd key in [] instead () on non ANSI/PETSCII terms).
      Use @` instead of @~ codes to define strict hot-keys.
      Use HOT:STRICT @-code to declare a strict hot-key color.
      Use HOT:HUNGRY @-code to toggle back to hungry color-defined hot-keys (the default).
      New optional boolean argument to JS console.add_hotkey(), hungry = true by default.
      6f16fafe
  29. May 08, 2020
    • rswindell's avatar
      More mouse hot spot stuff: · e821783a
      rswindell authored
      - User Defaults menu mousified
      - When all hot spots have scrolled off the screen, clear the hot spot list
      - Insert new hot spots in the front of the list so they will take precedence
        over any previously defined duplicate hot spots
      - Numeric hot spot commands end in a carriage-return
      - No auto-acceptence of numbers when there are keys in the keyboard buffer
      - Baja UNGETKEY function now inserts keys into the "front" of the keyboard
        buffer (next to be consumed)
      - Hot key @-code command text supports C-style escape sequences
        (allows encoding of ctrl chars, spaces, etc.)
      e821783a
    • rswindell's avatar
      Add sbbs_t::keybuf_space() and keybuf_level() · a5b0f07f
      rswindell authored
      and JS console.keyboard_buffer_space() and keyboard_buffer_level()
      ... for tracking the number of character spaces used and available in the the (unget)keyboard input buffer.
      a5b0f07f
    • rswindell's avatar
      Add mouse hot spot support: · 87c9982c
      rswindell authored
      - hot spots are clickable screen areas (e.g. in menus and prompts) that   generate key-strokes
      - commands may be from 1 to 127 ASCII-characters in length
      - currently using the X10 mouse reporting mode, may change
      - all mnemonics strings (~Example) are automatically hot-spots
      - The new ~ @-code defines a hot spot
      - Any screen-clear operation clears all hot spots
      - sbbs now tracks the current screen (cursor position) row
      - eliminated the old "tos" (top-of-screen) boolean (row == 0 indicates "tos")
      - created an sbbs_t::ungetstr() method
      - keep track if in pause (hit a key) prompt, for special mouse behavior
      
      new JS console object:
      - row property
      - tos property is now read-only (and deprecated)
      - new methods:
        add_hotspot()
        clear_hotspots()
        scroll_hotspots()
      
      redrwstr() gets some UTF8 touch-ups as part of this commit. <shrug>
      87c9982c
  30. May 04, 2020
  31. Apr 06, 2020
  32. Mar 01, 2020
    • rswindell's avatar
      sbbs_t::yesno() and noyes() and their JS equivalents (console.yesno/noyes) · 07f31378
      rswindell authored
      now accept an optional print-mode (a.k.a. pmode) argument to provide more
      control over the printing that happens in these functions/methods.
      The immediate use is for P_NOCRLF to stop the newline from being printed
      after a yes or no response (e.g. in a full-screen UI), but there could be other
      uses.
      07f31378
Loading