• src/syncterm/Wren.adoc term.c

    From Deucе@VERT to Git commit to main/sbbs/master on Tuesday, April 28, 2026 06:00:41
    https://gitlab.synchro.net/main/sbbs/-/commit/bfeca552699312ed6a0e11e5
    Modified Files:
    src/syncterm/Wren.adoc term.c
    Log Message:
    SyncTERM: fire Hook.onInput on the raw wire stream, pre-parse_rip

    Previously the input hook fired well downstream — after parse_rip,
    ZMODEM detection, and OOII processing — which meant scripts never
    saw the bytes those layers had already consumed. In RIP mode, the
    hook saw essentially nothing.

    Move the dispatch into recv_bytes(), right after conn_recv_upto and
    before parse_rip, and compact dropped bytes out of the buffer in
    place. Scripts now see every byte off the wire and can intercept
    them before any framing layer. Gated on wren_host_active() so the
    no-scripts path stays a single global bool check, no per-byte
    function-call overhead.

    Speed emulation does not apply: parse_rip already bypasses speed
    gating in bulk, so gating only the Wren hook would be inconsistent.

    Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>

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