• ctrl/modopts.ini docs/v32

    From Rob Swindell (on Debian L@VERT to Git commit to main/sbbs/m on Fri Oct 23 20:52:00 2026
    https://gitlab.synchro.net/main/sbbs/-/commit/c559c5ccf05ea61a96bbbbf3
    Modified Files:
    ctrl/modopts.ini docs/v322_new.md exec/load/shell_lib.js exec/xtrn_sec.js src/sbbs3/atcodes.cpp js_console.cpp sbbs.h termaudio_cache.cpp xtrn_sec.cpp text/sound/README.txt
    Log Message:
    Add console sound methods and modopts.ini section sound/music keys

    The section hooks added in 96736a3631 (orders-4-aging, 2026-10-19) could
    only play a sound by evaluating a bbs.atcode("SOUND:...") expression. Sound
    is now a feature in its own right:

    console.play_sound(), play_music(), cache_sound(), music_volume(),
    stop_music() and stop_sound() give scripts what the terminal audio @-codes
    do, through the same code: the @-codes and the methods now share sbbs_t::play_sound() and cache_sound(), so the terminal's audio file cache tracking, the content-hash check, the size limits, the text/sound path restriction and the NO_SOUND gate apply equally to both.

    modopts.ini gains [shell] main_sound, file_sound, main_music and
    file_music, and [xtrn_sec] enter_sound and enter_music, each naming a file
    in text/sound. The main_enter, file_enter and eval_first expressions
    remain for anything else.

    Requesting the music that is already looping no longer restarts it; only
    its volume is set. Moving between two sections that share a theme would otherwise start it over on every hop. Stopping the music, and running any external program (which may have changed or stopped it), forgets what was playing, so the next request starts it again.

    Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
  • From Rob Swindell (on Windows@VERT to Git commit to main/sbbs/m on Sat Nov 14 20:16:00 2026
    https://gitlab.synchro.net/main/sbbs/-/commit/4eb42d604b264e6671a90ed9
    Modified Files:
    ctrl/modopts.ini docs/v322_new.md exec/load/select_item.js exec/text_sec.js
    Log Message:
    text_sec.js: arrow-key navigation, highlight and paging via select_item.js

    The text file section list and each section's file list are now built
    on load/select_item.js, as the area selection lists and uselect.js are:
    a list longer than the screen is paged, with an [x-y of n] indicator,
    the arrow, Home/End and PgUp/PgDn keys move through it, and it is
    repainted in place.

    New modopts.ini [text_sec] options default_item_prefix,
    nondefault_item_prefix and default_item_attr mark and highlight a
    default item, which Enter then selects; more_fmt formats the indicator.
    In a file list the default item is the first file, then the one after
    the file last read. Without those options the lists look as they did,
    no item is marked, the navigation keys only scroll a long list and
    Enter does what it did before. The highlight is applied only when the
    text.dat format displays the name with a plain %s. A text_sec or
    text<N> menu file displayed in place of a list keeps number entry only.
    The stock modopts.ini enables the marker and highlight, as it does for
    [shell].

    For the file list's command keys ('?' and the sysop's A, R, E and D), select_item() gains two options: "keys", additional command keys
    returned to the caller (read with console.getkeys() in place of console.getnum()), and "no_default", for a list with no marked item.

    Ctrl-C at a file list now always quits; it used to read the next file
    when one had already been read. A clicked item number that could be the
    start of a longer one is now completed with Enter.

    First part of #1346; xtrn_sec.js is not changed.

    Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
  • From Rob Swindell (on Windows@VERT to Git commit to main/sbbs/m on Sat Nov 14 21:50:00 2026
    https://gitlab.synchro.net/main/sbbs/-/commit/77686747c912589b496636bf
    Modified Files:
    ctrl/modopts.ini docs/v322_new.md exec/load/select_item.js exec/xtrn_sec.js
    Log Message:
    xtrn_sec.js: arrow-key navigation, highlight and paging via select_item.js

    The external program section and program lists are now displayed and
    answered through select_item() (issue #1346), as the text file section
    lists are:

    - Lists that don't fit on the screen are paged, with an [x-y of n]
    indicator, rather than scrolled off the top.
    - New modopts.ini [xtrn_sec] options default_item_prefix,
    nondefault_item_prefix, default_item_attr and more_fmt mark and
    highlight a default item that the arrow, Home/End and PgUp/PgDn keys
    move and Enter chooses. In a program list, the default item is the
    program last run. Without these options the lists look as they did,
    Enter does what it did and the navigation keys only page.
    - The marker is left out of a two-column list that would be wider than
    the screen with it (the stock format at 80 columns); the highlighted
    name marks the default item there.
    - The name is highlighted only when the item format displays it with a
    plain %s or a fixed-width field (e.g. %-32.32s).
    - With clear_screen disabled, a list is displayed as before, without
    paging or navigation.
    - The multicolumn, center, sort and align options, the head and tail
    menu files and the menu files displayed in place of a list (answered
    by number only) are unchanged.

    select_item.js gained what this needed:

    - columns and column_separator options: the items are listed down each
    column in turn and the left and right arrow keys move between the
    columns. A list longer than a page of columns is displayed in whole
    pages, redrawn on a page change.
    - header may be a function, and a new footer function displays what
    goes between the list and the prompt. A footer that pushes the prompt
    off the screen is measured and the list redisplayed in the rows left.
    - no_clear option: display the list without clearing the screen, not
    paged and without the navigation keys.

    The stock modopts.ini enables the marker and highlight.

    Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
  • From Rob Swindell (on Windows@VERT to Git commit to main/sbbs/m on Sat Nov 14 22:53:00 2026
    https://gitlab.synchro.net/main/sbbs/-/commit/2b85f4dd04d2ca70212a4d1f
    Modified Files:
    ctrl/modopts.ini docs/v322_new.md exec/load/shell_lib.js exec/text_sec.js uselect.js xtrn_sec.js
    Log Message:
    List options: "selected" item, not "default"; xtrn_sec lightbar option

    Rename the modopts.ini options (all new in v3.22) that mark and
    highlight the item the arrow keys move and Enter chooses:

    - [shell], [text_sec] and [xtrn_sec]: default_item_prefix,
    nondefault_item_prefix and default_item_attr are now
    selected_item_prefix, unselected_item_prefix and selected_item_attr
    - [uselect]: default_item_fmt and nondefault_item_fmt are now
    selected_item_fmt and unselected_item_fmt

    The old names are no longer read: a modopts.ini that set them needs the
    keys renamed.

    New [xtrn_sec] lightbar option: when true, selected_item_attr highlights
    the whole selected item (its number too, without its own colors) as a
    bar the width of the list's widest item, rather than its name alone.

    Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
  • From Rob Swindell (on Debian L@VERT to Git commit to main/sbbs/m on Sat Nov 21 11:03:00 2026
    https://gitlab.synchro.net/main/sbbs/-/commit/5a72645ed585d5af83d9f5c1
    Modified Files:
    ctrl/modopts.ini docs/v322_new.md exec/avatars.js update.js
    Log Message:
    avatars.js: a first import reads recent messages only, each one once

    Reported by Accession on IRC: "jsexec update.js" added the AVAT-IN and
    AVAT-OUT events, and the import that followed looked like an endless
    loop.

    Two things made the first import long:

    - With no import pointer saved, it started at message 1 and read the
    whole sub: 3,728 network avatar messages of 5,233 in SYNCDATA on
    Vertrauen.
    - The starting offset was computed as total_msgs - (last_msg - pointer),
    which is far below zero when the pointer is 0 and the sub has been
    purged. MsgBase.get_msg_index() counts a negative offset from the end,
    so the loop made about last_msg failed or repeated index reads and
    imported every message twice (7,456 imports for those 3,728
    messages). The offset is now clamped to 0.

    A first import (no import_ptr in the sub's .ini file and no -ptr
    option) now begins after the newest message older than
    first_import_days, a new [avatars] option in modopts.ini (default 30,
    0 for the whole sub). Avatars in use are exported again every
    export_freq days (default 7), so the recent messages hold them. On the
    same sub that is 862 messages.

    update.js names its -noavatars option when it installs the feature.

    Tested with the import function run against the live SYNCDATA index
    (read-only) with the per-message import and the pointer file stubbed:
    first run 862 messages from the first one newer than 30 days, pointer
    saved; second run none; -ptr=0 3,728, each once (7,456 before the
    clamp). A real import into avatar files was not run.

    Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>