Skip to content
Snippets Groups Projects
Commit d81f6e81 authored by Rob Swindell's avatar Rob Swindell :speech_balloon:
Browse files

Add/use a general pause() routine with a configurable duration

By default, just use console.pause() (the "hit a key" prompt), but
if [msglist] pause is set to a delay duration (in seconds, fractions
supported), then delay instead. If pause is set to false, don't delay
or pause.

Do the delay/pause thing after posting messages too (not just email).
parent a7589318
No related branches found
No related tags found
1 merge request!463MRC mods by Codefenix (2024-10-20)
......@@ -322,6 +322,14 @@ function help()
console.pause();
}
function pause()
{
if(typeof options.pause == "number")
mswait(Number(options.pause) * 1000);
else if(options.pause !== false)
console.pause();
}
function list_msg(msg, digits, selected, sort, msg_ctrl, exclude, is_operator)
{
var color = color_cfg.column[0];
......@@ -1040,10 +1048,11 @@ function list_msgs(msgbase, list, current, preview, grp_name, sub_name)
case 'R':
if(mail) {
mail_reply(list[current], key == 'A');
console.pause();
pause();
} else {
console.clear();
bbs.post_msg(msgbase.subnum, list[current]);
pause();
return true;
}
break;
......@@ -1064,7 +1073,7 @@ function list_msgs(msgbase, list, current, preview, grp_name, sub_name)
break;
case 'M':
mail_reply(list[current]);
console.pause();
pause();
break;
case 'D':
console.clearline();
......@@ -1237,16 +1246,17 @@ function list_msgs(msgbase, list, current, preview, grp_name, sub_name)
case 'R':
if(mail) {
mail_reply(list[current], key.toUpperCase() == 'A');
console.pause();
pause();
} else {
console.clear();
bbs.post_msg(msgbase.subnum, list[current]);
pause();
return true; // reload msgs
}
break;
case 'M':
mail_reply(list[current]);
console.pause();
pause();
break;
case 'S':
if(sort == undefined)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment