From a99ae0cf80331a47e46078cb04b0546e4c91f8e7 Mon Sep 17 00:00:00 2001
From: Rob Swindell <rob@synchro.net>
Date: Tue, 6 Oct 2020 18:49:40 -0700
Subject: [PATCH] Add (D)ownload command while in read-msg mode.

Same as while in list mode, offers download of message source or any
attachments.

Fix extraneous PAUSE prompt from Operator menu '?' command by using
P_NOCRLF mode argument to bbs.menu().
---
 exec/msglist.js | 11 ++++++++++-
 1 file changed, 10 insertions(+), 1 deletion(-)

diff --git a/exec/msglist.js b/exec/msglist.js
index 172d7bd97b..668167df29 100644
--- a/exec/msglist.js
+++ b/exec/msglist.js
@@ -1044,6 +1044,15 @@ function list_msgs(msgbase, list, current, preview, grp_name, sub_name)
 						case 'M':
 							mail_reply(list[current]);
 							break;
+						case 'D':
+							console.clearline();
+							if(!console.noyes("Download message source", P_NOCRLF)) {
+								if(!download_msg_source(list[current], msgbase))
+									alert("failed");
+							}
+							console.creturn();
+							bbs.download_msg_attachments(list[current]);
+							break;
 						case 'S':
 							view_source = !view_source;
 							view_hex = false;
@@ -1071,7 +1080,7 @@ function list_msgs(msgbase, list, current, preview, grp_name, sub_name)
 									case '?':
 										if(user.settings & USER_EXPERT) {
 											console.line_counter = 0;
-											bbs.menu("sysmscan");
+											bbs.menu("sysmscan", P_NOCRLF);
 											console.crlf();
 										}
 										continue;
-- 
GitLab