...
 
Commits (3)
// E-mail Section
// $Id: email_sec.js,v 1.10 2020/04/24 08:05:39 rswindell Exp $
// Note: this module replaces the old ### E-mail section ### Baja code in exec/*.src
// replace "call E-mail" with "exec_bin email_sec"
......@@ -17,14 +15,17 @@ const ini_section = "netmail sent";
const NetmailAddressHistoryLength = 10;
while(bbs.online) {
while(bbs.online && !console.aborted) {
if(!(user.settings & USER_EXPERT))
bbs.menu("e-mail");
bbs.nodesync();
console.print("\r\n\1_\1y\1hE-mail: \1n");
var wm_mode = WM_NONE;
var cmdkeys = "SARUFNKQ?\r";
var cmdkeys = "LSARUFNKQ?\r";
switch(console.getkeys(cmdkeys,K_UPPER)) {
case 'L': // List/read your mail
load({}, "msglist.js", "mail","-preview");
break;
case 'R': // Read your mail
bbs.read_mail(MAIL_YOUR, user.number);
break;
......
......@@ -217,7 +217,7 @@ BinkP.prototype.crypt = {
var ret = '';
var ch;
for (i=0; i<buf.length; i++) {
for (i=0; buf !== null && i<buf.length; i++) {
ch = ascii(ascii(buf[i]) ^ this.decrypt_byte(keys));
ret += ch;
this.update_keys(keys, ch);
......@@ -229,7 +229,7 @@ BinkP.prototype.crypt = {
var i;
var ret = '';
for (i=0; i<buf.length; i++) {
for (i=0; buf !== null && i<buf.length; i++) {
t = this.decrypt_byte(keys);
this.update_keys(keys, buf[i]);
ret += ascii(ascii(buf[i]) ^ t);
......