• exec/mqtt_spy.js

    From Rob Swindell (on Debian L@VERT to Git commit to main/sbbs/m on Fri Nov 13 20:36:00 2026
    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>