• exec/mqtt_spy.js

    From Rob Swindell (on Debian Linux)@1:103/705 to Git commit to main/sbbs/master on Friday, November 13, 2026 20:36:22
    https://gitlab.synchro.net/main/sbbs/-/commit/4992e7ed855369e62b191c12
    Modified Files:
    exec/mqtt_spy.js
    Log Message:
    mqtt_spy: reset terminal attributes on status change and exit

    The spied-upon node's output can leave the spying terminal in any color
    (e.g. the user dropped while in a door or chat), so "New node status"
    and "Done spying" would inherit those colors.

    Send a full attribute reset first: the terminal-type-appropriate
    sequence from console.ansi(ANSI_NORMAL) when run in the terminal server (written raw, since the spied output bypasses attribute tracking and an attribute change via console.attributes or Ctrl-A could be a no-op), or
    an ANSI SGR 0 when run via jsexec.

    Also disable the JS time limit, since spying is open-ended.

    Fixes #1343

    Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
    --- SBBSecho 3.38-Linux
    * Origin: Vertrauen - [vert/cvs/bbs].synchro.net (1:103/705)