• exec/tests/server/max_ina

    From Rob Swindell (on Debian L@VERT to Git commit to main/sbbs/m on Fri Nov 20 15:25:00 2026
    https://gitlab.synchro.net/main/sbbs/-/commit/4bd8664ff3094a7cc4f9d8f9
    Added Files:
    exec/tests/server/max_inactivity.js
    Modified Files:
    src/sbbs3/js_server.cpp mailsrvr.cpp main.cpp sbbs.h services.cpp websrvr.cpp
    Log Message:
    JS server object: add read-only server.max_inactivity (seconds)

    A script run by a server can now relate its own timing to that server's
    idle limit, e.g. a web page that polls can choose an interval that does
    not land just as the server closes a kept-alive connection.

    The value per server:
    - Web Server: its MaxInactivity (after the built-in default is applied).
    - Mail Server: its MaxInactivity (likewise).
    - Terminal Server: the session limit, MaxSessionInactivity. It has four
    other stage-specific limits; console.max_socket_inactivity gives the
    one in force at the moment, as the property's description says.
    - Services: 0, meaning the server has no single inactivity limit.
    - The FTP Server runs no scripts, so it creates no server object and
    nothing changes there. jsexec, jsdoor and background load() threads
    create no server object either, as before.

    Each server sets the value inside its recycle loop, so a changed setting
    is reported after the server is recycled.

    The new field is appended to js_server_props_t in sbbs.h, an internal
    struct that only the servers and libsbbs share; it is not part of the *_startup_t structs that the Control Panel checks.

    Tested with GCC only (Linux): a scratch Web Server on loopback reported
    45, then 120 after a recycle with a changed MaxInactivity.

    Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>