• exec/install-xtrn.js exec/load/cfglib.js

    From Rob Swindell (on Debian Linux)@VERT to Git commit to main/sbbs/master on Tuesday, November 24, 2026 19:31:58
    https://gitlab.synchro.net/main/sbbs/-/commit/55e7dc10b1ed61911e5162bf
    Modified Files:
    exec/install-xtrn.js exec/load/cfglib.js
    Log Message:
    install-xtrn.js: install file viewers, testers, extractors and compressors

    A program's install-xtrn.ini can now register file type handlers in ctrl/file.ini with [viewer:<exts>], [tester:<exts>], [extractor:<ext>]
    and [compressor:<ext>] sections, holding cmd, ars, ex_mode (eval'd
    against sbbsdefs.js) and, for a tester, working. The usual note, prompt, required, last and done keys apply.

    Placement follows how each type is matched at run time. Every matching
    tester is run, so a new tester is appended. For the other types the
    first match is used, so a new handler goes ahead of the first existing
    one that would match a file of one of its types (one for the same
    extension, or a broader wildcard such as the "*" catch-all viewer),
    else it is appended. A new wildcard handler thus doesn't take over
    types that have their own handlers.

    A handler with the same command-line for any of the same types counts
    as already installed: -auto skips it, otherwise the sysop is asked.
    file.ini is written at the end, with xtrn.ini, so a failed [exec:] or
    [eval:] step leaves neither changed.

    cfglib.js can now write file.ini: only the handler sections, renumbered
    in list order and updated in place where their contents changed. The
    root section, protocols, libraries and directories are left alone.
    Handler values are now read as strings, since typed values don't
    survive being written back (extension=001 would become 1).

    Fixes #1408

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

    ---
    þ Synchronet þ Vertrauen þ Home of Synchronet þ [vert/cvs/bbs].synchro.net