Skip to content
Snippets Groups Projects
Commit 26eebd1c authored by rswindell's avatar rswindell
Browse files

Fixed a typo and a couple of undefined variables.

Added a configurable "from address".
parent d8c7a383
No related branches found
No related tags found
No related merge requests found
......@@ -10,7 +10,7 @@
// Configuration file (in ctrl/mlistgate.cfg) format:
// <subcode> <emailaddr> [emailaddr] [...]
// <subcode> <fromaddr> <toaddr> [toaddr] [...]
const REVISION = "$Revision$".split(' ')[1];
......@@ -23,6 +23,9 @@ var tagline = format(" * %s - %s - telnet://%s\r\n"
var cfg_fname = system.ctrl_dir + "mlistgate.cfg";
var reset_export_ptrs = false;
var update_export_ptrs = false;
load("sbbsdefs.js");
if(this.js==undefined) // v3.10?
......@@ -70,6 +73,8 @@ for(i in area) {
sub = area[i].shift();
from = area[i].shift();
msgbase = new MsgBase(sub);
if(msgbase.open!=undefined && msgbase.open()==false) {
printf("!ERROR %s opening msgbase: %s\r\n",msgbase.last_error,sub);
......@@ -107,7 +112,7 @@ for(i in area) {
/* EXPORT Local Messages */
/*************************/
last_msg=msgbase.last_msg;
for(;ptr<=last_msg && !js.terminated;p tr++) {
for(;ptr<=last_msg && !js.terminated;ptr++) {
if(this.console!=undefined)
console.line_counter = 0;
hdr = msgbase.get_msg_header(
......@@ -156,6 +161,9 @@ for(i in area) {
hdr.to_net_addr = listserv;
hdr.to_net_type = NET_INTERNET;
hdr.from_net_addr = from;
hdr.from_net_type = NET_INTERNET;
/* Copy to message base */
mailbase.save_msg(hdr,body);
printf("Exported message %lu to list server: %s\r\n",ptr,listserv);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment