Skip to content
Snippets Groups Projects
Commit 7ef426f7 authored by rswindell's avatar rswindell
Browse files

Use require() instead of load().

Use the cached text.js.
Use the cached userprops.js.
Use const where applicable.
Call bbs.nodesync() before the command prompt.
Display sent-mail in reverse order (newest at top).
parent 15dbef26
No related branches found
No related tags found
No related merge requests found
...@@ -5,16 +5,22 @@ ...@@ -5,16 +5,22 @@
// Note: this module replaces the old ### E-mail section ### Baja code in exec/*.src // Note: this module replaces the old ### E-mail section ### Baja code in exec/*.src
// replace "call E-mail" with "exec_bin email_sec" // replace "call E-mail" with "exec_bin email_sec"
load("sbbsdefs.js"); require("sbbsdefs.js", "WM_NONE");
var text = load({}, "text.js"); require("userdefs.js", "USER_EXPERT");
var userprops = load({}, "userprops.js"); var text = bbs.mods.text;
var ini_section = "netmail sent"; if(!text)
text = load(bbs.mods.text = {}, "text.js");
var userprops = bbs.mods.userprops;
if(!userprops)
userprops = load(bbs.mods.userprops = {}, "userprops.js");
const ini_section = "netmail sent";
const NetmailAddressHistoryLength = 10; const NetmailAddressHistoryLength = 10;
while(bbs.online) { while(bbs.online) {
if(!(user.settings & USER_EXPERT)) if(!(user.settings & USER_EXPERT))
bbs.menu("e-mail"); bbs.menu("e-mail");
bbs.nodesync();
console.print("\r\n\1_\1y\1hE-mail: \1n"); console.print("\r\n\1_\1y\1hE-mail: \1n");
var wm_mode = WM_NONE; var wm_mode = WM_NONE;
var cmdkeys = "SARUFNKQ?\r"; var cmdkeys = "SARUFNKQ?\r";
...@@ -23,10 +29,10 @@ while(bbs.online) { ...@@ -23,10 +29,10 @@ while(bbs.online) {
bbs.read_mail(MAIL_YOUR, user.number); bbs.read_mail(MAIL_YOUR, user.number);
break; break;
case 'U': // Read your un-read mail case 'U': // Read your un-read mail
bbs.read_mail(MAIL_YOUR, user.number, LM_UNREAD); bbs.read_mail(MAIL_YOUR, user.number, LM_UNREAD|LM_REVERSE);
break; break;
case 'K': // Read/Kill sent mail case 'K': // Read/Kill sent mail
bbs.read_mail(MAIL_SENT, user.number); bbs.read_mail(MAIL_SENT, user.number, LM_REVERSE);
break; break;
case 'F': // Send Feedback case 'F': // Send Feedback
bbs.email(/* user # */1, bbs.text(text.ReFeedback)); bbs.email(/* user # */1, bbs.text(text.ReFeedback));
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment