• ARS: add terminal capability keywords (SOUND, MOUSE, and possibly ICE/

    From Rob Swindell@1:103/705 to GitLab issue in main/sbbs on Mon Oct 19 12:32:29 2026
    open https://gitlab.synchro.net/main/sbbs/-/work_items/1292

    ## Summary

    Add ARS keywords for terminal capabilities that the Terminal Server already detects but that ARS cannot test, starting with audio (`SOUND`) and mouse (`MOUSE`).

    ## Motivation

    The new sound @-codes (`@SOUND:`, `@MUSIC:`, etc.) are silently skipped for terminals that cannot decode audio, and for users who turned sound off. A display file has no way to make the same decision for content *around* the sound.

    Concrete case: a logoff display file that plays a 12-second clip with `@SOUND:` must keep the connection open until the clip ends, because SyncTERM stops all audio at disconnect. A plain `@WAIT:100@` makes every caller wait, including those who hear nothing. The only workaround today is a JS module run with `@EXEC:` that checks `console.audio_files` and `user.settings & USER_NO_SOUND`. With a keyword, the file could do it inline:

    ```
    @SOUND:clip.ogg@ ... @SHOW:SOUND@@WAIT:100@@SHOW@
    ```

    ## Existing terminal keywords

    `ANSI`, `RIP`, `PETSCII`, `ASCII`, `UTF8`, `CP437`, `TERM`, `COLS`, `ROWS` (session evaluation in `chk_ar.cpp`, parsing in `ars.c`, sessionless evaluation in `userdat.c`).

    ## Proposed keywords

    | Keyword | True when | Source |
    |---|---|---|
    | `SOUND` | terminal can decode audio files AND the user has not set "suppress BBS-initiated sound" | `term->audio_files && !(useron.misc & NO_SOUND)`, the same gate the `@SOUND:` code uses in `atcodes.cpp` |
    | `MOUSE` | terminal supports mouse hot-spots | `term->supports(MOUSE)` (`@MOUSE@` already prints On/Off, but there is nothing to gate on) |
    | `ICE` (optional) | bright-background (iCE color) support | `term->supports(ICE_COLOR)` |
    | `COLOR` (optional) | color codes are sent | `term->supports(COLOR)` |

    Plain keywords, like the existing set, rather than a parameterized `CAP=...` form. The existing `NoAccessTerminal` text works for each of them.

    ## Points to settle

    - **Sessionless evaluation (`userdat.c`)**, used where there is no live terminal (e.g. web/FTP servers): `SOUND` should be false, or follow just the user's `NO_SOUND` setting, the way `ANSI` falls back to the user's stored terminal flags. `MOUSE`/`ICE`/`COLOR` can follow the stored `user->misc` flags.
    - **Detection timing:** audio support is detected by a probe when the user connects. A `SOUND` check evaluated before that probe completes (e.g. in the earliest pre-logon display files) would be false; document when the keyword is reliable.
    - **Graphics (sixel/JXL) is out of scope for now:** that support is detected in `cterm_lib.js` and by the doors, not stored on the terminal object, so a keyword for it would first need the detection result recorded server-side.
    - Documentation: wiki `access:requirements` page, and a `docs/v322_new.md` bullet.

    Related: #1049 (user properties in ARS).

    - *Authored by Claude (Claude Code), on behalf of @rswindell*
    --- SBBSecho 3.38-Linux
    * Origin: Vertrauen - [vert/cvs/bbs].synchro.net (1:103/705)
  • From Rob Swindell@1:103/705 to GitLab note in main/sbbs on Thu Oct 22 18:15:40 2026
    https://gitlab.synchro.net/main/sbbs/-/work_items/1292#note_10668

    Implemented `SOUND` and `MOUSE` (committed to master, pending push; the commit's `Fixes #1292` will close this issue).

    - `SOUND`: true when the terminal can play sound files (the same detection the `@SOUND:` codes use) and the user has not turned BBS-initiated sound off.
    - `MOUSE`: true when the terminal supports mouse hot-spots.
    - Sessionless evaluation (no live terminal, e.g. web/FTP servers): `SOUND` follows only the user's sound setting, `MOUSE` the user's stored mouse setting.
    - A failed check reports the existing `NoAccessTerminal` text.
    - `ICE`/`COLOR` were not added.

    Docs: `docs/v322_new.md`, and on the wiki [access:requirements](https://wiki.synchro.net/access:requirements) (Boolean Parameters) and [custom:atcodes](https://wiki.synchro.net/custom:atcodes#terminal_audio) (Terminal Audio, with the `@SHOW:SOUND@` logoff example and the note that `SOUND` is false until audio detection completes).

    SCFG's *Set Required Terminal Type/Capability* menu offers both keywords (separate commit, also pending push).

    - *Authored by Claude (Claude Code), on behalf of @rswindell*
    --- SBBSecho 3.38-Linux
    * Origin: Vertrauen - [vert/cvs/bbs].synchro.net (1:103/705)