Newer
Older
" be used to identify a specific node regardless of which zone that\n"
" node is located (thus breaking the rules of FidoNet 3D addressing).\n"
"\n"
"`Maximum Age of Imported EchoMail` allows you to optionally set an age\n"
" limit of EchoMail messages that may be imported.\n"
" This setting defaults to `60 days`.\n"
"\n"
"`Require Area-Linked Nodes to be Configured` allows you to specify\n"
" whether or not each linked node in the area file must be configured\n"
" in the `Linked Nodes` list.\n"
snprintf(opt[i++],MAX_OPLN-1,"%-45.45s%s", "Area Manager",cfg.areamgr);
snprintf(opt[i++],MAX_OPLN-1,"%-45.45s%luK","Maximum Packet Size"
,cfg.maxpktsize/1024UL);
snprintf(opt[i++],MAX_OPLN-1,"%-45.45s%luK","Maximum Bundle Size"
,cfg.maxbdlsize/1024UL);
snprintf(opt[i++],MAX_OPLN-1,"%-45.45s%-3.3s","Secure Operation"
,cfg.secure_echomail ? "Yes":"No");
snprintf(opt[i++],MAX_OPLN-1,"%-45.45s%-3.3s","Notify Users of Received EchoMail"
,cfg.echomail_notify ? "Yes":"No");
snprintf(opt[i++],MAX_OPLN-1,"%-45.45s%-3.3s","Convert Existing Tear Lines"
,cfg.convert_tear ? "Yes":"No");
snprintf(opt[i++],MAX_OPLN-1,"%-45.45s%s","Automatically Add New Subs "
"to Area List", cfg.auto_add_subs ? (cfg.auto_add_to_areafile ? "List/File":"List Only"):"No");
snprintf(opt[i++],MAX_OPLN-1,"%-45.45s%-3.3s","Allow Nodes to Add Areas "
"from Area File",cfg.add_from_echolists_only ? "No":"Yes");
snprintf(opt[i++],MAX_OPLN-1,"%-45.45s%u","Maximum Backups to Maintain of Area File"
,cfg.areafile_backups);
snprintf(opt[i++],MAX_OPLN-1,"%-45.45s%s","Circular Path Detection"
,cfg.check_path ? "Enabled" : "Disabled");
snprintf(opt[i++],MAX_OPLN-1,"%-45.45s%s","Relay Filtered Messages"
,cfg.relay_filtered_msgs ? "Yes" : "No");
snprintf(opt[i++],MAX_OPLN-1,"%-45.45s%s","Outbound Bundle Attachments"
,cfg.trunc_bundles ? "Truncate" : "Delete");
if(cfg.zone_blind)
sprintf(str,"Zones 1-%u", cfg.zone_blind_threshold);
else
SAFECOPY(str,"Disabled");
snprintf(opt[i++],MAX_OPLN-1,"%-45.45s%s","Zone Blind SEEN-BY and PATH Lines", str);
if(cfg.max_echomail_age)
snprintf(opt[i++],MAX_OPLN-1,"%-45.45s%s","Maximum Age of Imported EchoMail", str);
snprintf(opt[i++],MAX_OPLN-1,"%-45.45s%s","Require Area-Linked Nodes to be Configured"
,cfg.require_linked_node_cfg ? "Yes" : "No");
j=uifc.list(WIN_ACT|WIN_SAV,0,0,0,&echomail_opt,0,"EchoMail Settings",opt);
break;
case 0:
"Local user to notify of AreaFix activity and errors.\n";
uifc.input(WIN_MID|WIN_BOT|WIN_SAV,0,0,"Area Manager (user name or alias)"
,cfg.areamgr
,LEN_ALIAS,K_EDIT);
break;
case 1:
"~ Maximum Packet Size ~\n\n"
"This is the maximum file size that SBBSecho will create when placing\n"
"outgoing messages into packets. The default max size is 250 Kilobytes.\n";
sprintf(str,"%lu",cfg.maxpktsize);
uifc.input(WIN_MID|WIN_BOT|WIN_SAV,0,0,"Maximum Packet Size (in Bytes)",str
,9,K_EDIT|K_NUMBER);
cfg.maxpktsize=atol(str);
case 2:
"~ Maximum Bundle Size ~\n\n"
"This is the maximum file size that SBBSecho will create when placing\n"
"outgoing packets into bundles. The default max size is 250 Kilobytes.\n";
sprintf(str,"%lu",cfg.maxbdlsize);
uifc.input(WIN_MID|WIN_BOT|WIN_SAV,0,0,"Maximum Bundle Size (in Bytes)",str
,9,K_EDIT|K_NUMBER);
cfg.maxbdlsize=atol(str);
break;
case 3:
k = !cfg.secure_echomail;
switch(uifc.list(WIN_MID|WIN_SAV,0,0,0,&k,0
,"Secure Operation",uifcYesNoOpts)) {
case 0: cfg.secure_echomail = true; break;
case 1: cfg.secure_echomail = false; break;
}
case 4:
k = !cfg.echomail_notify;
switch(uifc.list(WIN_MID|WIN_SAV,0,0,0,&k,0
,"Notify Users",uifcYesNoOpts)) {
case 0: cfg.echomail_notify = true; break;
case 1: cfg.echomail_notify = false; break;
}
break;
case 5:
k = !cfg.convert_tear;
switch(uifc.list(WIN_MID|WIN_SAV,0,0,0,&k,0
,"Convert Tear Lines",uifcYesNoOpts)) {
case 0: cfg.convert_tear = true; break;
case 1: cfg.convert_tear = false; break;
}
case 6:
i=0;
strncpy(opt[i++], "Area List (memory) Only", MAX_OPLN-1);
strncpy(opt[i++], "Area List and Area File", MAX_OPLN-1);
strncpy(opt[i++], "No", MAX_OPLN-1);
opt[i][0] = 0;
if(!cfg.auto_add_subs)
k = 2;
else if(cfg.auto_add_to_areafile)
k = 1;
else
k = 0;
,"Automatically Add New Sub-boards to Area List",opt)) {
case 0: cfg.auto_add_subs = true; cfg.auto_add_to_areafile = false; break;
case 1: cfg.auto_add_subs = true; cfg.auto_add_to_areafile = true; break;
case 2: cfg.auto_add_subs = false; break;
case 7:
k = cfg.add_from_echolists_only;
switch(uifc.list(WIN_MID|WIN_SAV,0,0,0,&k,0
,"Allow AreaFix-Add from Area File",uifcYesNoOpts)) {
case 0: cfg.add_from_echolists_only = false; break;
case 1: cfg.add_from_echolists_only = true; break;
}
break;
case 8:
sprintf(str, "%u", cfg.areafile_backups);
if(uifc.input(WIN_MID|WIN_SAV, 0, 0, "Total Area File Backups to Maintain"
,str, 5, K_EDIT|K_NUMBER) >= 0)
cfg.areafile_backups = atoi(str);
break;
case 9:
k = !cfg.check_path;
switch(uifc.list(WIN_MID|WIN_SAV,0,0,0,&k,0
,"Circular Path Detection",uifcYesNoOpts)) {
case 0: cfg.check_path = true; break;
case 1: cfg.check_path = false; break;
}
break;
case 10:
k = !cfg.check_path;
switch(uifc.list(WIN_MID|WIN_SAV,0,0,0,&k,0
,"Relay Filtered EchoMail Messages",uifcYesNoOpts)) {
case 0: cfg.relay_filtered_msgs = true; break;
case 1: cfg.relay_filtered_msgs = false; break;
}
break;
case 11:
{
k = cfg.trunc_bundles;
char* opt[] = {"Delete after Sent", "Truncate after Sent", NULL };
switch(uifc.list(WIN_MID|WIN_SAV,0,0,0,&k,0
,"Outbound Bundles",opt)) {
case 0: cfg.trunc_bundles = false; break;
case 1: cfg.trunc_bundles = true; break;
}
break;
case 12:
k = !cfg.zone_blind;
switch(uifc.list(WIN_MID|WIN_SAV,0,0,0,&k,0,"Zone Blind",uifcYesNoOpts)) {
case 0:
cfg.zone_blind = true;
uifc.helpbuf=
"Zone Blind Threshold";
sprintf(str,"%u",cfg.zone_blind_threshold);
if(uifc.input(WIN_MID|WIN_SAV,0,0
,"Zone Blind Threshold (highest zone in the blind range)"
, str, 5, K_EDIT|K_NUMBER) >= 0)
cfg.zone_blind_threshold = (uint16_t)atol(str);
break;
case 1:
cfg.zone_blind = false;
break;
}
break;
case 13:
"~ Maximum Age of Imported EchoMail ~\n\n"
"Maximum age of EchoMail that may be imported. The age is based\n"
"on the date supplied in the message header and may be incorrect in some\n"
"conditions (e.g. erroneous software or incorrect system date).\n"
"Set this value to `0` to disable this feature (no maximum age imposed)."
;
if(cfg.max_echomail_age)
if(uifc.input(WIN_MID|WIN_BOT|WIN_SAV,0,0,"Maximum EchoMail Age"
,str, 10, K_EDIT) >= 0)
cfg.max_echomail_age = (ulong)parse_duration(str);
break;
case 14:
k = !cfg.require_linked_node_cfg;
switch(uifc.list(WIN_MID|WIN_SAV,0,0,0,&k,0
,"Require Nodes Linked to Areas in Area File to be Configured",uifcYesNoOpts)) {
case 0: cfg.require_linked_node_cfg = true; break;
case 1: cfg.require_linked_node_cfg = false; break;
}
break;
}
"~ Archive Types ~\n\n"
"These are the archive file types that have been configured along with\n"
"their corresponding archive programs and command-lines for the packing\n"
"and unpacking of EchoMail bundle files.\n"
"\n"
"The corresponding archive programs are sometimes referred to as `packers`."
;
for(u=0;u<cfg.arcdefs;u++)
int mode = WIN_SAV | WIN_INS | WIN_DEL | WIN_ACT
| WIN_INSACT | WIN_DELACT | WIN_XTR;
if(cfg.arcdefs)
mode |= WIN_COPY | WIN_CUT;
if(savarcdef.name[0])
mode |= WIN_PASTE | WIN_PASTEXTR;
i=uifc.list(mode,0,0,0,&archive_opt,&archive_bar,"Archive Types",opt);
int msk = i & MSK_ON;
i &= MSK_OFF;
if (msk == MSK_INS) {
str[0]=0;
uifc.helpbuf=
"~ Archive Type ~\n\n"
"This is the identifying name of the archiving program (packer).\n";
if(uifc.input(WIN_MID|WIN_SAV,0,0
if(!new_arcdef(i)) {
printf("\nMemory Allocation Error\n");
}
SAFECOPY(cfg.arcdef[i].name,str);
}
if (msk == MSK_DEL || msk == MSK_CUT) {
if (msk == MSK_CUT)
memcpy(&savarcdef, &cfg.arcdef[i], sizeof(arcdef_t));
cfg.arcdefs--;
if(cfg.arcdefs<=0) {
cfg.arcdefs=0;
}
for(u=i;u<cfg.arcdefs;u++)
memcpy(&cfg.arcdef[u],&cfg.arcdef[u+1]
}
if (msk == MSK_COPY) {
memcpy(&savarcdef,&cfg.arcdef[i],sizeof(arcdef_t));
}
if (msk == MSK_PASTE) {
if(!new_arcdef(i))
continue;
memcpy(&cfg.arcdef[i],&savarcdef,sizeof(arcdef_t));
}
if (msk != 0)
continue;
uifc.helpbuf=
"Archive Type and Program configuration";
snprintf(opt[j++],MAX_OPLN-1,"%-30.30s %u","Signature Offset"
snprintf(opt[j++],MAX_OPLN-1,"%-30.30s %s","Pack Command Line"
snprintf(opt[j++],MAX_OPLN-1,"%-30.30s %s","Unpack Command Line"
,cfg.arcdef[i].unpack);
opt[j][0]=0;
uifc_winmode_t wmode = WIN_ACT|WIN_SAV|WIN_RHT|WIN_BOT|WIN_EXTKEYS;
if(i > 0)
wmode |= WIN_LEFTKEY;
if(i + 1 < (int)cfg.arcdefs)
wmode |= WIN_RIGHTKEY;
k=uifc.list(wmode,0,0,72,&packop,0,str,opt);
if(k==-1)
break;
switch(k) {
case -CIO_KEY_LEFT-2:
if(i > 0)
i--;
break;
case -CIO_KEY_RIGHT-2:
if(i + 1 < (int)cfg.arcdefs)
i++;
break;
"~ Archive Type ~\n\n"
"This is the identifying name of the archive file type. Usually this name\n"
"corresponds with the common file extension or suffix denoting this type\n"
uifc.input(WIN_MID|WIN_SAV,0,0
,"Archive Type"
,cfg.arcdef[i].name,sizeof(cfg.arcdef[i].name)-1
,K_EDIT|K_UPPER);
break;
case 1:
"~ Archive Signature ~\n\n"
"This is the identifying signature of the archive file format (in\n"
"hexadecimal notation). This signature is used in combination with the\n"
"Archive `Signature Offset` for the automatic detection of proper archive\n"
"program to extract (unarchive) inbound EchoMail bundle files."
;
uifc.input(WIN_MID|WIN_SAV,0,0
,"Archive Signature"
,cfg.arcdef[i].hexid,sizeof(cfg.arcdef[i].hexid)-1
,K_EDIT|K_UPPER);
break;
case 2:
"~ Archive Signature Offset ~\n\n"
"This is the byte-offset of the identifying signature of the archive file\n"
"format. This offset is used in combination with the Archive `Signature`\n"
"for the automatic detection of proper archive program to extract\n"
sprintf(str,"%u",cfg.arcdef[i].byteloc);
if(uifc.input(WIN_MID|WIN_SAV,0,0
,"Archive Signature Offset",str,5
,K_NUMBER|K_EDIT) > 0)
cfg.arcdef[i].byteloc=atoi(str);
"~ Pack Command Line ~\n\n"
"This is the command-line to execute to create an archive file of the\n"
"selected type. The following command-line specifiers may be used for\n"
"dynamic variable replacement:\n"
"\n"
" `%f` The path/filename of the archive file to be created\n"
" `%s` The path/filename of the file(s) to be added to the archive\n"
" `%!` The Synchronet `exec` directory\n"
" `%@` The Synchronet `exec` directory only for non-Unix systems\n"
" `%.` Blank for Unix systems, '`.exe`' otherwise\n"
" `%?` The current platform description (e.g. 'linux', 'win32')\n"
" `%j` The Synchronet `data` directory\n"
" `%k` The Synchronet `ctrl` directory\n"
" `%o` The configured system operator name\n"
" `%q` The configured system QWK-ID\n"
" `%g` The configured temporary file directory\n"
uifc.input(WIN_MID|WIN_SAV,0,0
,"Pack Command Line"
,cfg.arcdef[i].pack,sizeof(cfg.arcdef[i].pack)-1
,K_EDIT);
break;
case 4:
"~ Unpack Command Line ~\n\n"
"This is the command-line to execute to extract an archive file of the\n"
"selected type. The following command-line specifiers may be used for\n"
"dynamic variable replacement:\n"
"\n"
" `%f` The path/filename of the archive file to be extracted\n"
" `%s` The destination directory for files extracted from the archive\n"
" `%!` The Synchronet `exec` directory\n"
" `%@` The Synchronet `exec` directory only for non-Unix systems\n"
" `%.` Blank for Unix systems, '`.exe`' otherwise\n"
" `%?` The current platform description (e.g. 'linux', 'win32')\n"
" `%j` The Synchronet `data` directory\n"
" `%k` The Synchronet `ctrl` directory\n"
" `%o` The configured system operator name\n"
" `%q` The configured system QWK-ID\n"
" `%g` The configured temporary file directory\n"
uifc.input(WIN_MID|WIN_SAV,0,0
,"Unpack Command Line"
,cfg.arcdef[i].unpack,sizeof(cfg.arcdef[i].unpack)-1
}
2405
2406
2407
2408
2409
2410
2411
2412
2413
2414
2415
2416
2417
2418
2419
2420
2421
2422
2423
2424
2425
2426
2427
2428
2429
2430
2431
2432
2433
2434
2435
2436
2437
2438
2439
2440
2441
2442
2443
2444
2445
2446
2447
2448
2449
2450
2451
2452
2453
2454
2455
2456
2457
2458
2459
2460
2461
2462
2463
2464
2465
2466
2467
2468
2469
2470
2471
2472
2473
2474
2475
2476
2477
2478
2479
2480
2481
2482
uifc.helpbuf=
"~ Robots ~\n\n"
"The `Robots` sub-menu is where NetMail Robots are configured.\n"
"\n"
"When a NetMail message is received addressed to one of the configured\n"
"Robot `Names`, it will be stored in the `mail` message base and the\n"
"associated `Semaphore File` (if non-blank) will be touched.\n"
"\n"
"If the NetMail message has the `In-Transit` attribute flag set, it\n"
"will not be exported by SBBSecho back into a stored message (*.msg)\n"
"file. Therefore, it is recommended to include the In-Transit attribute\n"
"flag (0x20) in the Robot's `Attributes` value if the Robot (e.g. script)\n"
"is going to expect the message to be in the mail base.\n"
;
i=0;
while(1) {
for(u=0; u < cfg.robot_count; u++)
snprintf(opt[u], MAX_OPLN-1, "%-*s %s"
,FIDO_DOMAIN_LEN, cfg.robot_list[u].name, cfg.robot_list[u].semfile);
opt[u][0]=0;
int mode = WIN_SAV | WIN_INS | WIN_DEL | WIN_ACT
| WIN_INSACT | WIN_DELACT | WIN_XTR;
if(cfg.robot_count)
mode |= WIN_COPY | WIN_CUT;
if(saverobot.name[0])
mode |= WIN_PASTE | WIN_PASTEXTR;
i=uifc.list(mode,0,0,0,&robot_opt,&robot_bar,"Robots",opt);
if(i==-1)
break;
int msk = i&MSK_ON;
i &= MSK_OFF;
if (msk == MSK_INS) {
str[0]=0;
if(uifc.input(WIN_MID|WIN_SAV,0,0
,"NetMail Robot Name", str, FIDO_DOMAIN_LEN, K_EDIT)<1)
continue;
if(!new_robot(i)) {
printf("\nMemory Allocation Error\n");
exit(1);
}
SAFECOPY(cfg.robot_list[i].name, str);
continue;
}
if (msk == MSK_DEL || msk == MSK_CUT) {
if(msk == MSK_CUT)
memcpy(&saverobot, &cfg.robot_list[i], sizeof(saverobot));
cfg.robot_count--;
if(cfg.robot_count <= 0) {
cfg.robot_count = 0;
continue;
}
for(u=i; u < cfg.robot_count; u++)
memcpy(&cfg.robot_list[u], &cfg.robot_list[u+1], sizeof(struct robot));
continue;
}
if (msk == MSK_COPY) {
memcpy(&saverobot, &cfg.robot_list[i], sizeof(saverobot));
continue;
}
if (msk == MSK_PASTE) {
if(!new_robot(i))
continue;
memcpy(&cfg.robot_list[i], &saverobot, sizeof(saverobot));
continue;
}
if (msk != 0)
continue;
while(1) {
j=0;
snprintf(opt[j++],MAX_OPLN-1,"%-30.30s %s","Name"
,cfg.robot_list[i].name);
snprintf(opt[j++],MAX_OPLN-1,"%-30.30s %s","Semaphore File"
,cfg.robot_list[i].semfile);
snprintf(opt[j++],MAX_OPLN-1,"%-30.30s 0x%04hX","Attributes"
,cfg.robot_list[i].attr);
opt[j][0]=0;
SAFEPRINTF(str, "Robot - %s", cfg.robot_list[i].name);
uifc_winmode_t wmode = WIN_ACT|WIN_SAV|WIN_RHT|WIN_BOT|WIN_EXTKEYS;
if(i > 0)
wmode |= WIN_LEFTKEY;
if(i + 1 < (int)cfg.robot_count)
wmode |= WIN_RIGHTKEY;
k=uifc.list(wmode,0,0,72,&listop,0,str,opt);
if(k==-1)
break;
switch(k) {
case -CIO_KEY_LEFT-2:
if(i > 0)
i--;
break;
case -CIO_KEY_RIGHT-2:
if(i + 1 < (int)cfg.robot_count)
i++;
break;
2500
2501
2502
2503
2504
2505
2506
2507
2508
2509
2510
2511
2512
2513
2514
2515
2516
2517
2518
2519
2520
2521
case 0:
uifc.input(WIN_MID|WIN_SAV,0,0
,"Robot Name"
,cfg.robot_list[i].name,sizeof(cfg.robot_list[i].name)-1
,K_EDIT);
break;
case 1:
uifc.input(WIN_MID|WIN_SAV,0,0
,"Semaphore Path/Filename"
,cfg.robot_list[i].semfile,sizeof(cfg.robot_list[i].semfile)-1
,K_EDIT);
break;
case 2:
sprintf(str, "%04hX", cfg.robot_list[i].attr);
if(uifc.input(WIN_MID|WIN_SAV,0,0
,"NetMail Attributes (in hexadecimal)"
,str, sizeof(str), K_EDIT) > 0)
cfg.robot_list[i].attr = (uint16_t)strtoul(str, NULL, 16);
break;
}
}
}
break;
uifc.helpbuf=
"~ Domains ~\n\n"
"The `Domains` sub-menu is where FidoNet-style domains (the '@domain'\n"
"of 5D FTN addresses) are mapped to zone numbers, DNS suffixes, NodeLists\n"
"and BSO root directories for use by the BinkIT mailer.\n"
"\n"
"The `DNS Suffix` is optional, but when specified, should point to a valid,\n"
"working Internet DNS service name for FTN address resolution (e.g.\n"
"`binkp.net` for FidoNet proper).\n"
"\n"
"The `NodeList` is optional, but when specified, should point to an\n"
"uncompressed, unarchived, NodeList in standard FidoNet NodeList format.\n"
i=0;
while(1) {
for(u=0; u < cfg.domain_count; u++)
snprintf(opt[u], MAX_OPLN-1, "%-*s %s"
,FIDO_DOMAIN_LEN, cfg.domain_list[u].name, cfg.domain_list[u].dns_suffix);
opt[u][0]=0;
int mode = WIN_SAV | WIN_INS | WIN_DEL | WIN_ACT
| WIN_INSACT | WIN_DELACT | WIN_XTR;
if(cfg.domain_count)
mode |= WIN_COPY | WIN_CUT;
if(savedomain.name[0])
mode |= WIN_PASTE | WIN_PASTEXTR;
i=uifc.list(mode,0,0,0,&domain_opt,&domain_bar,"Domains",opt);
if(i==-1)
break;
int msk = i&MSK_ON;
i &= MSK_OFF;
if (msk == MSK_INS) {
str[0]=0;
if(uifc.input(WIN_MID|WIN_SAV,0,0
,"FTN Domain Name", str, FIDO_DOMAIN_LEN, K_EDIT)<1)
continue;
if(!new_domain(i)) {
printf("\nMemory Allocation Error\n");
}
SAFECOPY(cfg.domain_list[i].name, str);
}
if (msk == MSK_DEL || msk == MSK_CUT) {
if(msk == MSK_CUT)
memcpy(&savedomain, &cfg.domain_list[i], sizeof(savedomain));
cfg.domain_count--;
if(cfg.domain_count <= 0) {
cfg.domain_count = 0;
}
for(u=i; u < cfg.domain_count; u++)
memcpy(&cfg.domain_list[u], &cfg.domain_list[u+1], sizeof(struct fido_domain));
}
if (msk == MSK_COPY) {
memcpy(&savedomain, &cfg.domain_list[i], sizeof(savedomain));
}
if (msk == MSK_PASTE) {
if(!new_domain(i))
continue;
memcpy(&cfg.domain_list[i], &savedomain, sizeof(savedomain));
}
if (msk != 0)
continue;
while(1) {
j=0;
snprintf(opt[j++],MAX_OPLN-1,"%-30.30s %s","Name"
,cfg.domain_list[i].name);
snprintf(opt[j++],MAX_OPLN-1,"%-30.30s %s","Zones"
,int_list(cfg.domain_list[i].zone_list, cfg.domain_list[i].zone_count));
snprintf(opt[j++],MAX_OPLN-1,"%-30.30s %s","DNS Suffix"
,cfg.domain_list[i].dns_suffix);
snprintf(opt[j++],MAX_OPLN-1,"%-30.30s %s","Outbound Root"
,cfg.domain_list[i].root);
snprintf(opt[j++],MAX_OPLN-1,"%-30.30s %s","NodeList"
,cfg.domain_list[i].nodelist);
opt[j][0]=0;
SAFEPRINTF(str, "Domain - %s", cfg.domain_list[i].name);
uifc_winmode_t wmode = WIN_ACT|WIN_SAV|WIN_RHT|WIN_BOT|WIN_EXTKEYS;
if(i > 0)
wmode |= WIN_LEFTKEY;
if(i + 1 < (int)cfg.domain_count)
wmode |= WIN_RIGHTKEY;
k=uifc.list(wmode,0,0,72,&listop,0,str,opt);
if(k==-1)
break;
switch(k) {
case -CIO_KEY_LEFT-2:
if(i > 0)
i--;
break;
case -CIO_KEY_RIGHT-2:
if(i + 1 < (int)cfg.domain_count)
i++;
break;
2623
2624
2625
2626
2627
2628
2629
2630
2631
2632
2633
2634
2635
2636
2637
2638
2639
2640
2641
2642
2643
2644
2645
2646
2647
2648
2649
2650
2651
2652
2653
2654
2655
2656
case 0:
uifc.input(WIN_MID|WIN_SAV,0,0
,"Domain Name"
,cfg.domain_list[i].name,sizeof(cfg.domain_list[i].name)-1
,K_EDIT);
break;
case 1:
SAFECOPY(str, int_list(cfg.domain_list[i].zone_list, cfg.domain_list[i].zone_count));
if(uifc.input(WIN_MID|WIN_SAV, 0, 0
,"Zone List (comma-separated)"
,str, 40, K_EDIT) >= 0) {
FREE_AND_NULL(cfg.domain_list[i].zone_list);
cfg.domain_list[i].zone_list = parseIntList(str, ",", &cfg.domain_list[i].zone_count);
uifc.changes = TRUE;
}
break;
case 2:
uifc.input(WIN_MID|WIN_SAV,0,0
,"DNS Suffix"
,cfg.domain_list[i].dns_suffix,sizeof(cfg.domain_list[i].dns_suffix)-1
,K_EDIT);
break;
case 3:
uifc.input(WIN_MID|WIN_SAV,0,0
,"Outbound Root Directory"
,cfg.domain_list[i].root,sizeof(cfg.domain_list[i].root)-1
,K_EDIT);
break;
case 4:
uifc.input(WIN_MID|WIN_SAV,0,0
,"NodeList"
,cfg.domain_list[i].nodelist,sizeof(cfg.domain_list[i].nodelist)-1
,K_EDIT);
break;
}
break;
while(1) {
uifc.helpbuf=
"~ EchoLists ~\n\n"
"This feature allows you to specify lists of echoes, in `BACKBONE.NA`\n"
"format, which are utilized in `addition` to your Area File (e.g. \n"
"`areas.bbs`) for advanced AreaFix (Area Management) operations.\n";
for(u=0;u<cfg.listcfgs;u++)
int mode = WIN_SAV | WIN_INS | WIN_DEL | WIN_ACT
| WIN_INSACT | WIN_DELACT | WIN_XTR;
if(cfg.listcfgs)
mode |= WIN_COPY | WIN_CUT;
if(savlistcfg.listpath[0])
mode |= WIN_PASTE | WIN_PASTEXTR;
i=uifc.list(mode,0,0,0,&echolist_opt,&echolist_bar,"EchoLists",opt);
break;
int msk = i&MSK_ON;
i &= MSK_OFF;
if (msk == MSK_INS) {
str[0]=0;
uifc.helpbuf=
"~ EchoList ~\n\n"
"This is the path and filename of the echolist file you wish\n"
"to add.\n";
if(uifc.input(WIN_MID|WIN_SAV,0,0
if(!new_list(i)) {
printf("\nMemory Allocation Error\n");
}
SAFECOPY(cfg.listcfg[i].listpath,str);
}
if (msk == MSK_DEL || msk == MSK_CUT) {
if(msk == MSK_CUT)
memcpy(&savlistcfg, &cfg.listcfg[i], sizeof(echolist_t));
cfg.listcfgs--;
if(cfg.listcfgs<=0) {
cfg.listcfgs=0;
}
for(u=i;u<cfg.listcfgs;u++)
memcpy(&cfg.listcfg[u],&cfg.listcfg[u+1]
}
if (msk == MSK_COPY) {
memcpy(&savlistcfg,&cfg.listcfg[i],sizeof(echolist_t));
}
if (msk == MSK_PASTE) {
if(!new_list(i))
continue;
memcpy(&cfg.listcfg[i],&savlistcfg,sizeof(echolist_t));
}
if (msk != 0)
continue;
"~ Configuring an EchoList ~\n\n"
"The `EchoList Path/Name`, `Required Key` and `Hub Address` must be configured\n"
"correctly and any one of the Required Keys added to the `EchoList Keys`\n"
"of the `Linked Nodes` of interest.\n"
"\n"
"The other settings are only for forwarding received Area Manager\n"
"requests 'upstream' (to your hub) when needed.\n"
;
snprintf(opt[j++],MAX_OPLN-1,"%-30.30s %s","EchoList Path/Name"
snprintf(opt[j++],MAX_OPLN-1,"%-30.30s %s","Required Key"
,strListCombine(cfg.listcfg[i].keys, str, sizeof(str), ","));
snprintf(opt[j++],MAX_OPLN-1,"%-30.30s %s","Hub Address"
,(cfg.listcfg[i].hub.zone) ?
faddrtoa(&cfg.listcfg[i].hub) : "None");
snprintf(opt[j++],MAX_OPLN-1,"%-30.30s %s","Forward AreaMgr Requests"
if(cfg.listcfg[i].forward) {
snprintf(opt[j++],MAX_OPLN-1,"%-30.30s %s","AreaMgr Name"
,cfg.listcfg[i].areamgr);
snprintf(opt[j++],MAX_OPLN-1,"%-30.30s %s","AreaMgr Password"
,cfg.listcfg[i].password);
}
SAFEPRINTF(str, "EchoList - %s", getfname(cfg.listcfg[i].listpath));
uifc_winmode_t wmode = WIN_ACT|WIN_SAV|WIN_RHT|WIN_BOT|WIN_EXTKEYS;
if(i > 0)
wmode |= WIN_LEFTKEY;
if(i + 1 < (int)cfg.listcfgs)
wmode |= WIN_RIGHTKEY;
k=uifc.list(wmode,0,0,72,&listop,0,str,opt);
break;
case -CIO_KEY_LEFT-2:
if(i > 0)
i--;
break;
case -CIO_KEY_RIGHT-2:
if(i + 1 < (int)cfg.listcfgs)
i++;
break;
uifc.input(WIN_MID|WIN_SAV,0,0
,"EchoList Path/Name"
,cfg.listcfg[i].listpath,sizeof(cfg.listcfg[i].listpath)-1
,K_EDIT);
"~ Required Key ~\n\n"
"These keys determine which linked nodes have access to the selected\n"
"echolist file via AreaFix requests (e.g. query, add, remove).\n"
"\n"
"A linked node need only have one of the required keys to have access\n"
"the echolist."
;
for(u=0; cfg.listcfg[i].keys!=NULL && cfg.listcfg[i].keys[u] != NULL;u++)
strcpy(opt[u],cfg.listcfg[i].keys[u]);
x=uifc.list(WIN_SAV|WIN_INS|WIN_DEL|WIN_ACT|
WIN_XTR|WIN_INSACT|WIN_DELACT|WIN_RHT
if(x==-1)
break;
if((x&MSK_ON)==MSK_INS) {
x&=MSK_OFF;
str[0]=0;
if(uifc.input(WIN_MID|WIN_SAV,0,0
,K_EDIT|K_UPPER)<1)
continue;
}
if((x&MSK_ON)==MSK_DEL) {
x&=MSK_OFF;
}
,str,SBBSECHO_MAX_KEY_LEN,K_EDIT|K_UPPER);
strListReplace(cfg.listcfg[i].keys,x,str);
}
SAFECOPY(str,faddrtoa(&cfg.listcfg[i].hub));
2823
2824
2825
2826
2827
2828
2829
2830
2831
2832
2833
2834
2835
2836
2837
2838
2839
2840
2841
2842
2843
2844
2845
2846
2847
2848
else
str[0]=0;
uifc.input(WIN_MID|WIN_SAV,0,0
,"Hub Address",str
,25,K_EDIT);
if(str[0])
cfg.listcfg[i].hub=atofaddr(str);
else
memset(&cfg.listcfg[i].hub,0
,sizeof(faddr_t));
break;
case 3:
cfg.listcfg[i].forward = !cfg.listcfg[i].forward;
break;
case 4:
uifc.input(WIN_MID|WIN_SAV,0,0
,"Name to use when forwarding AreaMgr requests"
,cfg.listcfg[i].areamgr,sizeof(cfg.listcfg[i].areamgr)-1
,K_EDIT);
break;
case 5:
uifc.input(WIN_MID|WIN_SAV,0,0
,"Password to use when forwarding AreaMgr requests"
,cfg.listcfg[i].password,sizeof(cfg.listcfg[i].password)-1
,K_EDIT|K_UPPER);
break;
}
uifc.pop("Writing config ...");
bool success = sbbsecho_write_ini(&cfg);
uifc.pop(NULL);
if(!success)
uifc.msg("Error saving configuration file");
else {
orig_cfg = cfg;
uifc.changes = FALSE;
}
if(cfg.used_include) {
if(uifc.msg("Changes made will not be saved"))
break;
} else {
uifc.helpbuf=
"~ Save Configuration File ~\n\n"
"Select `Yes` to save the config file, `No` to quit without saving,\n"
"or hit ~ ESC ~ to go back to the menu.\n\n";
i=0;
i=uifc.list(WIN_MID|WIN_SAV,0,0,0,&i,0,"Save Config File",uifcYesNoOpts);
if(i==-1) break;
if(i == 0) {
uifc.pop("Writing config ...");
bool success = sbbsecho_write_ini(&cfg);
uifc.pop(NULL);
if(!success)
uifc.msg("Error saving configuration file");
}
}
uifc.pop("Exiting");
break;