mirror of
https://github.com/D-Modem/bbs.git
synced 2026-11-28 17:38:04 -08:00
A script (scripts_dir/NAME.js, run by a menu's script:NAME, and logon.js after each login) draws the BBS's shared screens through ui (menus, tables, forms, panels, messages, the editor, confirmations), so one script works on text, RIP and 3270 terminals. It acts as its caller, with their access: msg (areas, messages, posting, mail), node (who's online, node messages, its activity), user, bbs; and keeps JSON values in data, for everyone or (data.user) for the caller, in the database (script_data). goja runs it in strict mode, with no files, network or processes. A watchdog stops a script that computes more than two seconds between screens (the caller's time at a screen is not counted); the caller hanging up ends a script whatever it catches; failures are logged and told (to a sysop, with why). Scripts are compiled once, again when changed; bbs check refuses scripts that do not compile and menus naming missing ones. goja is pinned to its June 2026 commit (the last that builds with Go 1.24; it is changing quickly now). scripts.sample has one-liners and a poll; both are tested, the one-liners on a text terminal and on a 3270 (s3270). That test found 3270 forms broken since the shared screens: the input field began under its label's last character, whose attribute byte erased it. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01AFQhReUqUc7F5srk2hViqr