• src/sbbs3/js_global.cpp

    From Rob Swindell (on Windows@VERT to Git commit to main/sbbs/m on Sat Nov 14 23:31:00 2026
    https://gitlab.synchro.net/main/sbbs/-/commit/678ac2ea59eff73a3b59f155
    Modified Files:
    src/sbbs3/js_global.cpp
    Log Message:
    New JS global function: bool_search(expression [,text] [,...])

    Expose the boolean search engine (boolsrch.c) that the Terminal Server's
    text searches use to JavaScript. The function returns true if the
    expression matches the text strings given (a term may be found in any
    one of them), and throws an exception whose message is the syntax error
    of an invalid expression, so calling it with no text validates one.

    It has no user interaction of its own: prompting for an expression and reporting an error are up to the caller.

    For issue #1345.

    Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
  • From Rob Swindell (on Debian L@VERT to Git commit to main/sbbs/m on Fri Nov 20 18:12:00 2026
    https://gitlab.synchro.net/main/sbbs/-/commit/b6c2ca2e50cb8ca5bcc1af38
    Modified Files:
    src/sbbs3/js_global.cpp
    Log Message:
    require(): don't report "symbol not defined" when the load was aborted

    When a web client disconnects, the web server's operation callback aborts
    the running script without setting the terminated flag. If that happens
    while require() is loading a file, js_load() fails with no exception
    pending and require() then reported the requested symbol as missing, e.g.:

    Failed to load event module nodelist: Error: symbol 'USER_DELETED' not
    defined by script 'sbbsdefs.js'

    logged by webv4's events.ssjs when a crawler dropped the event stream.
    Worse, the uncatchable abort became a catchable exception. The js_IsTerminated() check added in 78b2682ec8 (urge-22-door, 2023-12-14)
    doesn't cover this path, since the disconnect abort never sets the flag.

    Only check for the symbol after a successful load; a failed load with no exception pending propagates as the abort it is.

    Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>