diff --git a/ctrl/modopts.ini b/ctrl/modopts.ini index ba1ae35db7b08285c7794d9a087e32af3d38cc80..1d768e747f455d27fbe0b0ef04e0da41d7230cd2 100644 --- a/ctrl/modopts.ini +++ b/ctrl/modopts.ini @@ -95,6 +95,10 @@ ; multicolumn_fmt: \1h\1c%3u \xb3 \1n\1c%-26.26s\1h %5u ; singlecolumn_fmt: \1h\1c%3u \xb3 \1n\1c%-26.26s\1h %5u +; to ask for continuation after showing DOOR intro/message file, enable this +; prompt_on_info = true +; prompt_on_info_fmt: \r\n\x01n\x01cDo you wish to continue + [chat_sec] ; Over-ride default IRC server/port and channel (if desired) here: irc_server = irc.synchro.net 6667 diff --git a/exec/prextrn.js b/exec/prextrn.js index 46132f3277976bb56bf8f7b939f6712c4cdfad08..7a2df9c23fb7c0b4917cbec66e160fde54dd8176 100644 --- a/exec/prextrn.js +++ b/exec/prextrn.js @@ -14,6 +14,15 @@ function exec_xtrn_pre(prog) options = {}; // default values } + // If displaying CODE.ans file, prompt the user to continue to enter the game or not + if (typeof options.prompt_on_info === "undefined") { + options.prompt_on_info = false; + } + + if (typeof options.prompt_on_info_fmt === "undefined") { + options.prompt_on_info_fmt = "\r\n\x01n\x01cDo you wish to continue"; + } + require("nodedefs.js", "NODE_LOGN"); if (bbs.node_action == NODE_LOGN) { if (options.disable_pre_on_logon_event) { @@ -33,7 +42,15 @@ function exec_xtrn_pre(prog) if (bbs.menu_exists("xtrn/" + prog.code)) { bbs.menu("xtrn/" + prog.code); - console.pause(); + + // If displaying CODE.ans file, prompt the user to continue to enter the game or not + if (options.prompt_on_info) { + if (!console.yesno(options.prompt_on_info_fmt)) { + exit(1); + } + } else { + console.pause(); + } console.line_counter=0; }