https://gitlab.synchro.net/sbbs/sbbs/-/commit/175d0fbc996e5292480bab8e
Modified Files:
src/sbbs3/exec.cpp
Log Message:
Always evaluate js.on_exit() installed expressions.I noticed that when executing an external JS with the new "Use Shell / New Context" option set to "Yes", that any expressions (strings) installed via js.on_exit() were not being
executed upon exit from the script. These on-exit strings are important for restoring global state information (e.g. control key pass-through, console mode) to the original state before the JS mod made any changes.I'm not sure why
the special treatment of "scope == NULL" is through-out this function. Going back to v3.16, it appears this was special treatment for JS mods invoked via global hot key event (when scope != NULL). When invoking an xtrn JS mod with the new Context option, the scope argument is not NULL, so this check was defeating the parsing of the "exit_code" and the evaluation of any js.on_exit()
installed expressions for no apparent reason. I can't think why global hot key events should be excluded from this logic either.
--- SBBSecho 3.11-Linux
* Origin: Vertrauen - [vert/cvs/bbs].synchro.net (1:103/705)