open
https://gitlab.synchro.net/main/sbbs/-/issues/1182
A `mods/text/` (or `mods/text/menu/`) override file is silently shadowed by a stock `text/` file whenever the stock file uses a higher-priority extension for the caller's terminal type. This is the same class of bug fixed for custom-shell menu subdirectories in 151b9b5ca7 (sports-3-formal), on the other fallback axis (mods dir stock dir instead of menu subdir default dir).
## Reported behavior
Reported by Accession on IRC: with `mods/text/answer.asc` and stock `text/answer.msg` both present, callers were shown the stock `text/answer.msg`. Renaming the override to `mods/text/answer.msg` made it display. Expected: any `answer.*` in `mods/text/` overrides the stock file.
## Root cause
In `sbbs_t::menu()` (`src/sbbs3/prntfile.cpp`), the terminal-type extension priority loop lives at the top level (rip mon ans seq msg asc for a CP437 terminal). The mods-dir preference, however, lives inside `menu_exists_in()`, applied **per extension**: for each single extension, the mods path is checked before the stock path.
So for a typical ANSI/CP437 caller with `mods/text/answer.asc` + `text/answer.msg`:
1. `.ans` Ä not in mods, not in text miss
2. `.msg` Ä not in mods, **found in `text/`** done; `.asc` in mods is never consulted
A mods override therefore only wins when it uses the same (or a higher-priority) extension as the stock file. Worse, since the `.msg`/`.asc` order flips for ASCII-charset terminals, the same override works for ASCII callers and fails for CP437 callers Ä whether a sysop's customization is honored depends on the caller's terminal.
This has been the behavior since mods/text support was introduced in 4f66de6561 (holes-3-create).
## Suggested fix
Same surgery as 151b9b5ca7 (sports-3-formal): hoist the modsstock fallback out of `menu_exists_in()` so the entire extension priority list is exhausted in the mods dir before the stock dir is consulted Ä in both `sbbs_t::menu()` and the NULL-ext path of `menu_exists()`.
With two fallback axes (modsstock and menu-subdirdefault), the subdir axis should presumably stay outermost (shell-specific beats generic, even stock-vs-mods), giving the search order: `mods/<subdir>` `text/<subdir>` `mods/` `text/`, each exhausted across all applicable extensions.
Ä *Authored by Claude (Claude Code), on behalf of @rswindell*
---
þ Synchronet þ Vertrauen þ Home of Synchronet þ [vert/cvs/bbs].synchro.net