Skip to content
Snippets Groups Projects
echocfg.c 81.7 KiB
Newer Older
rswindell's avatar
rswindell committed
								}
rswindell's avatar
rswindell committed
							case __COUNTER__:
rswindell's avatar
rswindell committed
								k = !cfg.nodecfg[i].direct;
								switch(uifc.list(WIN_MID|WIN_SAV,0,0,0,&k,0
									,"Direct Delivery",uifcYesNoOpts)) {
									case 0:	cfg.nodecfg[i].direct = true;	uifc.changes=TRUE; break;
									case 1:	cfg.nodecfg[i].direct = false;	uifc.changes=TRUE; break;
								}
rswindell's avatar
rswindell committed
							case __COUNTER__:
rswindell's avatar
rswindell committed
								k = !cfg.nodecfg[i].passive;
								switch(uifc.list(WIN_MID|WIN_SAV,0,0,0,&k,0
									,"Passive Node",uifcYesNoOpts)) {
									case 0:	cfg.nodecfg[i].passive = true;	uifc.changes=TRUE; break;
									case 1:	cfg.nodecfg[i].passive = false;	uifc.changes=TRUE; break;
								}
rswindell's avatar
rswindell committed
							case __COUNTER__:
rswindell's avatar
rswindell committed
								k = !cfg.nodecfg[i].send_notify;
								switch(uifc.list(WIN_MID|WIN_SAV,0,0,0,&k,0
									,"Send AreaFix Notifications",uifcYesNoOpts)) {
									case 0:	cfg.nodecfg[i].send_notify = true;	uifc.changes=TRUE; break;
									case 1:	cfg.nodecfg[i].send_notify = false;	uifc.changes=TRUE; break;
								}
								break;
rswindell's avatar
rswindell committed
							case __COUNTER__:
rswindell's avatar
rswindell committed
	"~ Uplink for Message Groups ~\n\n"
	"These are Message Group short names (as configured in SCFG) for which\n"
	"this linked-node is your system's uplink (hub).\n"
	"\n"
	"Use of this setting allows your hub to be automatically linked with new\n"
	"areas when new Sub-boards (within a listed group) are auto-added to the\n"
	"Area File."
	;
								while(1) {
									for(j=0; cfg.nodecfg[i].grphub!=NULL && cfg.nodecfg[i].grphub[j]!=NULL ;j++)
										strcpy(opt[j],cfg.nodecfg[i].grphub[j]);
									opt[j][0]=0;
									k=uifc.list(WIN_SAV|WIN_INS|WIN_DEL|WIN_ACT|
										WIN_XTR|WIN_INSACT|WIN_DELACT|WIN_RHT
										,0,0,0,&k,0,"Uplink for Message Groups",opt);
									if(k==-1)
										break;
									if((k&MSK_ON)==MSK_INS) {
										k&=MSK_OFF;
										if(uifc.input(WIN_MID|WIN_SAV,0,0
											,"Message Group (short name)",str,LEN_GSNAME
											,/* kmode: */0) < 1)
											continue;
										strListInsert(&cfg.nodecfg[i].grphub, str, k);
										uifc.changes=TRUE;
										continue; 
									}

									if((k&MSK_ON)==MSK_DEL) {
										k&=MSK_OFF;
										strListRemove(&cfg.nodecfg[i].grphub, k);
										uifc.changes=TRUE;
										continue; 
									}
									SAFECOPY(str,cfg.nodecfg[i].grphub[k]);
									uifc.input(WIN_MID|WIN_SAV,0,0,"Message Group (short name)"
										,str,LEN_GSNAME,K_EDIT|K_UPPER);
									strListReplace(cfg.nodecfg[i].grphub, k, str);
									uifc.changes=TRUE;
									continue; 
								}
								break;
rswindell's avatar
rswindell committed
							case __COUNTER__:
rswindell's avatar
rswindell committed
	uifc.helpbuf=
	"~ Route To ~\n\n"
	"When using a BSO/FLO type mailer, this is the Fido address to route mail\n"
	"for this node(s) to.\n"
	"\n"
	"This option is normally only used with wildcard type node entries\n"
	"(e.g. `ALL`, or `1:ALL`, `2:ALL`, etc.) and is used to route non-direct\n"
	"NetMail packets to your uplink node (hub).\n";
								SAFECOPY(str,faddrtoa(&cfg.nodecfg[i].route));
rswindell's avatar
rswindell committed
								if(uifc.input(WIN_MID|WIN_SAV,0,0
									,"Node Address to Route To",str
rswindell's avatar
rswindell committed
									,25,K_EDIT) >= 0) {
									if(str[0])
										cfg.nodecfg[i].route=atofaddr(str);
									else
										cfg.nodecfg[i].route.zone=0;
rswindell's avatar
rswindell committed
									uifc.changes=TRUE;
								}
								break;
rswindell's avatar
rswindell committed
							case __COUNTER__:
rswindell's avatar
rswindell committed
								uifc.input(WIN_MID|WIN_SAV,0,0,"Inbound FileBox Directory"
									,cfg.nodecfg[i].inbox, sizeof(cfg.nodecfg[i].inbox)-1
									,K_EDIT);
								break;
rswindell's avatar
rswindell committed
							case __COUNTER__:
rswindell's avatar
rswindell committed
								uifc.input(WIN_MID|WIN_SAV,0,0,"Outbound FileBox Directory"
									,cfg.nodecfg[i].outbox, sizeof(cfg.nodecfg[i].outbox)-1
									,K_EDIT);
							case __COUNTER__:
								binkp_settings(&cfg.nodecfg[i]);
								break;
rswindell's avatar
rswindell committed
			case 5:	/* Paths and Filenames... */
					snprintf(opt[i++],MAX_OPLN-1,"%-30.30s %s","Non-secure Inbound Directory"
rswindell's avatar
rswindell committed
						,cfg.inbound[0] ? cfg.inbound : DEFAULT_INBOUND);
rswindell's avatar
rswindell committed
					snprintf(opt[i++],MAX_OPLN-1,"%-30.30s %s","Secure Inbound Directory"
rswindell's avatar
rswindell committed
						,cfg.secure_inbound[0] ? cfg.secure_inbound : DEFAULT_SECURE_INBOUND);
rswindell's avatar
rswindell committed
					snprintf(opt[i++],MAX_OPLN-1,"%-30.30s %s","Outbound Directory"
rswindell's avatar
rswindell committed
						,cfg.outbound[0] ? cfg.outbound : DEFAULT_OUTBOUND);
rswindell's avatar
rswindell committed
					snprintf(opt[i++],MAX_OPLN-1,"%-30.30s %s","Area File"
rswindell's avatar
rswindell committed
						,cfg.areafile[0] ? cfg.areafile : DEFAULT_AREA_FILE);
					snprintf(opt[i++],MAX_OPLN-1,"%-30.30s %s","Bad Area File"
rswindell's avatar
rswindell committed
						,cfg.badareafile[0] ? cfg.badareafile : DEFAULT_BAD_AREA_FILE);
rswindell's avatar
rswindell committed
					snprintf(opt[i++],MAX_OPLN-1,"%-30.30s %s","Log File"
rswindell's avatar
rswindell committed
						,cfg.logfile[0] ? cfg.logfile : DEFAULT_LOG_FILE);
					snprintf(opt[i++],MAX_OPLN-1,"%-30.30s %s","Echo Statistics File"
						,cfg.echostats[0] ? cfg.echostats : DEFAULT_ECHOSTATS_FILE);
					snprintf(opt[i++],MAX_OPLN-1,"%-30.30s %s","Temporary File Directory"
rswindell's avatar
rswindell committed
						,cfg.temp_dir[0] ? cfg.temp_dir	: DEFAULT_TEMP_DIR);
					snprintf(opt[i++],MAX_OPLN-1,"%-30.30s %s","Outgoing Semaphore File"
						,cfg.outgoing_sem);
rswindell's avatar
rswindell committed
					opt[i][0]=0;
rswindell's avatar
rswindell committed
						"~ Paths and Filenames ~\n\n"
						"From this menu you can configure the paths and filenames that SBBSecho\n"
						"will use during its operation (e.g. importing and exporting messages).\n";
					j=uifc.list(WIN_BOT|WIN_L2R|WIN_ACT|WIN_SAV,0,0,0,&path_opt,0
						,"Paths and Filenames",opt);
					if(j==-1)
rswindell's avatar
rswindell committed
	"~ Non-secure Inbound Directory ~\n\n"
	"This is the path where your FTN mailer stores, and where SBBSecho will\n"
	"look for, incoming files (potentially including message bundles and\n"
	"packets) from unauthenticated (non-secure) mailer sessions.\n"
	"\n"
	"Default value is `" DEFAULT_INBOUND "`."
rswindell's avatar
rswindell committed
							uifc.input(WIN_L2R|WIN_SAV,0,0,"Non-secure Inbound Directory"
rswindell's avatar
rswindell committed
								,cfg.inbound,sizeof(cfg.inbound)-1
								,K_EDIT);
rswindell's avatar
rswindell committed
	"~ Secure Inbound Directory ~\n\n"
	"This is the path where your FTN mailer stores, and where SBBSecho will\n"
	"look for, incoming message bundles and packets for `Secure` (password\n"
	"protected) sessions.\n"
	"\n"
	"Default value is `" DEFAULT_SECURE_INBOUND "`."
	;
							uifc.input(WIN_L2R|WIN_SAV,0,0,"Secure Inbound Directory"
rswindell's avatar
rswindell committed
								,cfg.secure_inbound,sizeof(cfg.secure_inbound)-1
								,K_EDIT);
rswindell's avatar
rswindell committed
	"~ Outbound Directory ~\n\n"
	"This is the path where your FTN mailer will look for, and where SBBSecho\n"
	"will place, outgoing message bundles and packets.\n"
	"\n"
	"In Binkley-Style Outbound mode, this serves as the base directory\n"
rswindell's avatar
rswindell committed
	"name for special foreign zone and point destination nodes as well."
rswindell's avatar
rswindell committed
	"\n"
	"Default value is `" DEFAULT_OUTBOUND "`."
rswindell's avatar
rswindell committed
	;
rswindell's avatar
rswindell committed
							uifc.input(WIN_L2R|WIN_SAV,0,0,"Outbound Directory"
rswindell's avatar
rswindell committed
								,cfg.outbound,sizeof(cfg.outbound)-1
								,K_EDIT);
rswindell's avatar
rswindell committed
	"~ Area File ~\n\n"
	"This is the path of the file SBBSecho will use as your primary\n"
	"list of FidoNet-style message areas (default is `data/areas.bbs`).\n"
	"\n"
	"Each line in the file defines an FTN message area (echo) of the format:\n"
	"\n"
	"   <`code`> <`tag`> [[`link`] [`link`] [...]]\n"
	"\n"
	"Each field is separated by one or more white-space characters:\n"
	"\n"
	"   `<code>` is the Synchronet `internal code` for the local sub-board\n"
	"   `<tag>`  is the network's agreed-upon `echo tag` for the message area\n"
	"   `[link]` is an `FTN address` to send and receive messages for this area\n"
	"          (there may be many linked nodes for each area)\n"
	"          (often your FTN uplink/hub may be the only linked node)\n"
	"\n"
	"Example Area Line:\n"
	"\n"
	"   `FIDO_BBS_CARN    BBS_CARNIVAL                        1:218/700`\n"
	"\n"
	"Notes:\n"
	"\n"
	" `*` Only the `<code>` and `<tag>` fields are required\n"
	" `*` The `<code>` and `<tag>` fields are case in-sensitive\n"
	" `*` The `[link]` fields must be 2D, 3D, or 4D FidoNet-style node addresses\n"
	" `*` The '`<`' and '`>`', '`[`' and '`]`' characters are not part of the syntax\n"
	" `*` Lines beginning with a semicolon (`;`) are ignored (i.e. comments)\n"
	" `*` Leading white-space characters are ignored\n"
	" `*` Blank lines are ignored\n"
	" `*` A `<tag>` value of `*` indicates a `bad echo` (unknown) area\n"
	" `*` A `<code>` value of `P` indicates a pass-through message area\n"
	" `*` This file may be import/exported to/from your `Message Areas` in `SCFG`\n"
	" `*` This file may be remotely modified by authorized nodes using `AreaFix`\n"
	"\n"
	"Default value is `" DEFAULT_AREA_FILE "`."
rswindell's avatar
rswindell committed
							uifc.input(WIN_L2R|WIN_SAV,0,0,"Area File"
rswindell's avatar
rswindell committed
								,cfg.areafile,sizeof(cfg.areafile)-1
								,K_EDIT);
rswindell's avatar
rswindell committed
	"~ Bad Area File ~\n\n"
	"This is the path of the file SBBSecho will use to record the names\n"
	"(echo tags) and descriptions of FTN message areas (echoes) that your\n"
	"system has received EchoMail for, but does not carry locally. The\n"
	"default path/filename is `" DEFAULT_BAD_AREA_FILE "`.\n"
	"\n"
	"Notes:\n"
	"\n"
	" `*` The descriptions of the areas will only be included if the\n"
	"   corresponding echo tags can be located in one of your configured\n"
	"   `EchoLists`.\n"
	"\n"
	" `*` The format of the file is the same as `BACKBONE.NA` and suitable for\n"
	"   importing into a Synchronet Message Group using `SCFG`.\n"
	"\n"
	" `*` SBBSecho will automatically sort and maintain this list, removing\n"
	"   areas if they are added to your configuration (`SCFG->Message Areas`)\n"
	"   and your `Area File`.\n"
rswindell's avatar
rswindell committed
							uifc.input(WIN_L2R|WIN_SAV,0,0,"Bad Area File"
								,cfg.badareafile,sizeof(cfg.badareafile)-1
								,K_EDIT);
							break;

						case 5:
	uifc.helpbuf=
rswindell's avatar
rswindell committed
	"~ Log File ~\n\n"
	"This is the path of the file SBBSecho will use to log information each\n"
	"time it is run (default is `" DEFAULT_LOG_FILE "`)."
rswindell's avatar
rswindell committed
							uifc.input(WIN_L2R|WIN_SAV,0,0,"Log File"
rswindell's avatar
rswindell committed
								,cfg.logfile,sizeof(cfg.logfile)-1
								,K_EDIT);
rswindell's avatar
rswindell committed
	"~ EchoStats File ~\n\n"
	"This is the path of the file SBBSecho will use to track statistics for\n"
	"EchoMail message areas (default is `" DEFAULT_ECHOSTATS_FILE "`)."
	;
							uifc.input(WIN_L2R|WIN_SAV,0,0,"EchoStats File"
								,cfg.echostats,sizeof(cfg.echostats)-1
								,K_EDIT);
							break; 

						case 7:
	uifc.helpbuf=
	"~ Temporary File Directory ~\n\n"
	"This is the directory where SBBSecho will store temporary files that\n"
	"it creates and uses during its run-time (default is `" DEFAULT_TEMP_DIR "`)."
rswindell's avatar
rswindell committed
							uifc.input(WIN_L2R|WIN_SAV,0,0,"Temp Dir"
								,cfg.temp_dir,sizeof(cfg.temp_dir)-1
								,K_EDIT);
							break; 
rswindell's avatar
rswindell committed

						case 8:
	uifc.helpbuf=
	"~ Outgoing Semaphore File ~\n\n"
	"This is an optional file to create/touch whenever there are new outbound\n"
	"files created or updated by SBBSecho."
	;
							uifc.input(WIN_L2R|WIN_SAV,0,0,"Outgoing Sem File"
								,cfg.outgoing_sem,sizeof(cfg.outgoing_sem)-1
								,K_EDIT);
							break; 
rswindell's avatar
rswindell committed

rswindell's avatar
rswindell committed
			case 3:	/* NetMail Settings */
rswindell's avatar
rswindell committed
					uifc.helpbuf=
rswindell's avatar
rswindell committed
	"~ NetMail Settings ~\n"
	"\n"
	"`Sysop Aliases` is a comma-separated list of names by which the sysop\n"
	"    (user #1) may receive NetMail messages, in addition to the alias\n"
	"    and real name associated with their BBS user account.\n"
	"    This setting defaults to just '`SYSOP`'.\n"
	"\n"
    "`Default Recipient` is the name of the user account you wish to receive\n"
	"    inbound NetMail messages that have been addressed to an unrecognized\n"
	"    user name or alias.\n"
	"\n"
	"`Fuzzy Zone Operation` when set to `Yes`, if SBBSecho receives an inbound\n"
	"    netmail with no international zone information, it will compare the\n"
	"    net/node of the destination to the net/node information in your AKAs\n"
	"    and assume the zone of a matching AKA.\n"
	"    This setting defaults to `No`.\n"
	"\n"
	"`Kill/Ignore Empty NetMail Messages` will instruct SBBSecho to simply\n"
	"    discard (not import or export) NetMail messages without any body.\n"
	"    This setting defaults to `Yes`.\n"
	"\n"
	"`Delete Processed NetMail Messages` will instruct SBBSecho to delete\n"
	"    NetMail messages/files after they have been sent or imported.\n"
	"    When set to `No`, SBBSecho will mark them as Sent or Received instead.\n"
	"    This setting defaults to `Yes`.\n"
	"\n"
	"`Ignore NetMail Destination Address` will instruct SBBSecho to treat\n"
	"    all NetMail as though it is destined for one of your systems's FTN\n"
	"    addresses (AKAs) and potentially import it.\n"
	"    This setting defaults to `No`.\n"
	"\n"
	"`Ignore Netmail 'Sent' Attribute` will instruct SBBSecho to export\n"
	"    NetMail messages even when their 'Sent' attribute flag is set.\n"
	"    This setting `should not` be set to `Yes` when `Delete NetMail` is\n"
	"    disabled.\n"
	"    This setting defaults to `No`.\n"
	"\n"
rswindell's avatar
rswindell committed
	"`Ignore Netmail 'KillSent' Attribute` will instruct SBBSecho to ignore\n"
	"    this attribute flag and will `not` delete Sent NetMail.\n"
	"    This setting defaults to `No`.\n"
	"\n"
rswindell's avatar
rswindell committed
	"`Ignore Netmail 'Received' Attribute` will instruct SBBSecho to import\n"
	"    NetMail messages even when their 'Received' attribute flag is set.\n"
	"    This setting defaults to `No`.\n"
	"\n"
	"`Ignore NetMail 'Local' Attribute` will instruct SBBSecho to import\n"
	"    NetMail messages even when their 'Local' attribute flag is set.\n"
	"    This setting defaults to `No`.\n"
	"\n"
	"`Maximum Age of Imported NetMail` allows you to optionally set an age\n"
	"    limit of NetMail messages that may be imported.\n"
	"    This setting defaults to `None` (no maximum age).\n"
rswindell's avatar
rswindell committed
;
rswindell's avatar
rswindell committed
					strListCombine(cfg.sysop_alias_list, sysop_aliases, sizeof(sysop_aliases)-1, ",");
					snprintf(opt[i++],MAX_OPLN-1,"%-40.40s%s", "Sysop Aliases",sysop_aliases);
					snprintf(opt[i++],MAX_OPLN-1,"%-40.40s%s", "Default Recipient"
						,cfg.default_recipient);
					snprintf(opt[i++],MAX_OPLN-1,"%-40.40s%-3.3s","Fuzzy Zone Operation"
						,cfg.fuzzy_zone ? "Yes":"No");
					snprintf(opt[i++],MAX_OPLN-1,"%-40.40s%-3.3s","Kill/Ignore Empty NetMail "
						"Messages",cfg.kill_empty_netmail ? "Yes":"No");
					snprintf(opt[i++],MAX_OPLN-1,"%-40.40s%-3.3s","Delete Processed NetMail"
						,cfg.delete_netmail ? "Yes":"No");
					snprintf(opt[i++],MAX_OPLN-1,"%-40.40s%-3.3s","Ignore NetMail Destination Address"
						,cfg.ignore_netmail_dest_addr ? "Yes" : "No");
					snprintf(opt[i++],MAX_OPLN-1,"%-40.40s%-3.3s","Ignore NetMail 'Sent' Attribute"
						,cfg.ignore_netmail_sent_attr ? "Yes" : "No");
rswindell's avatar
rswindell committed
					snprintf(opt[i++],MAX_OPLN-1,"%-40.40s%-3.3s","Ignore NetMail 'KillSent' Attribute"
						,cfg.ignore_netmail_kill_attr ? "Yes" : "No");
rswindell's avatar
rswindell committed
					snprintf(opt[i++],MAX_OPLN-1,"%-40.40s%-3.3s","Ignore NetMail 'Received' Attribute"
						,cfg.ignore_netmail_recv_attr ? "Yes" : "No");
					snprintf(opt[i++],MAX_OPLN-1,"%-40.40s%-3.3s","Ignore NetMail 'Local' Attribute"
						,cfg.ignore_netmail_local_attr ? "Yes" : "No");
					if(cfg.max_netmail_age)
rswindell's avatar
rswindell committed
						duration_to_vstr(cfg.max_netmail_age, str, sizeof(str));
rswindell's avatar
rswindell committed
					else
						SAFECOPY(str, "None");
rswindell's avatar
rswindell committed
					snprintf(opt[i++],MAX_OPLN-1,"%-40.40s%s","Maximum Age of Imported NetMail"	, str);
rswindell's avatar
rswindell committed
					opt[i][0]=0;
rswindell's avatar
rswindell committed
					j=uifc.list(WIN_ACT|WIN_SAV,0,0,0,&netmail_opt,0,"NetMail Settings",opt);
					if(j==-1)
						break;
					switch(j) {
						case 0:
rswindell's avatar
rswindell committed
							uifc.helpbuf=
rswindell's avatar
rswindell committed
							"~ Sysop Aliases ~\n\n"
							"This is a comma-separated list of additional `To` names that the sysop\n"
							"(user #1) can receive netmail by. When specifying multiple aliases,\n"
							"they must be separated by a single comma and no extra white-space\n"
							"(e.g. \"SYSOP,COORDINATOR\"). The default value is just `SYSOP`.\n";
rswindell's avatar
rswindell committed
							if(uifc.input(WIN_MID|WIN_BOT|WIN_SAV,0,0,"Sysop Aliases (comma separated)"
								,sysop_aliases
								,sizeof(sysop_aliases)-1,K_EDIT|K_UPPER) >= 0) {
								strListFree(&cfg.sysop_alias_list);
								cfg.sysop_alias_list = strListSplit(NULL, sysop_aliases, ",");
							}
rswindell's avatar
rswindell committed
							uifc.input(WIN_MID|WIN_SAV,0,0,"Default Recipient"
								,cfg.default_recipient, sizeof(cfg.default_recipient)-1
								,K_EDIT|K_UPPER);
rswindell's avatar
rswindell committed
							k = !cfg.fuzzy_zone;
							switch(uifc.list(WIN_MID|WIN_SAV,0,0,0,&k,0
								,"Fuzzy Zone Operation",uifcYesNoOpts)) {
								case 0:	cfg.fuzzy_zone = true;	break;
								case 1:	cfg.fuzzy_zone = false;	break;
							}
rswindell's avatar
rswindell committed
							k = !cfg.kill_empty_netmail;
							switch(uifc.list(WIN_MID|WIN_SAV,0,0,0,&k,0
								,"Delete Empty NetMail",uifcYesNoOpts)) {
								case 0:	cfg.kill_empty_netmail = true;	break;
								case 1:	cfg.kill_empty_netmail = false;	break;
							}
rswindell's avatar
rswindell committed
							k = !cfg.delete_netmail;
							switch(uifc.list(WIN_MID|WIN_SAV,0,0,0,&k,0
								,"Delete Processed NetMail",uifcYesNoOpts)) {
								case 0:	cfg.delete_netmail = true;	break;
								case 1:	cfg.delete_netmail = false;	break;
							}
rswindell's avatar
rswindell committed
							k = !cfg.ignore_netmail_dest_addr;
							switch(uifc.list(WIN_MID|WIN_SAV,0,0,0,&k,0
								,"Ignore NetMail Destination Address",uifcYesNoOpts)) {
								case 0:	cfg.ignore_netmail_dest_addr = true;	break;
								case 1:	cfg.ignore_netmail_dest_addr = false;	break;
							}
							k = !cfg.ignore_netmail_sent_attr;
							switch(uifc.list(WIN_MID|WIN_SAV,0,0,0,&k,0
								,"Ignore NetMail 'Sent' Attribute",uifcYesNoOpts)) {
								case 0:	cfg.ignore_netmail_sent_attr = true;	break;
								case 1:	cfg.ignore_netmail_sent_attr = false;	break;
							}
							break;
						case 7:
rswindell's avatar
rswindell committed
							k = !cfg.ignore_netmail_kill_attr;
							switch(uifc.list(WIN_MID|WIN_SAV,0,0,0,&k,0
								,"Ignore NetMail 'KillSent' Attribute",uifcYesNoOpts)) {
								case 0:	cfg.ignore_netmail_kill_attr = true;	break;
								case 1:	cfg.ignore_netmail_kill_attr = false;	break;
							}
							break;
						case 8:
rswindell's avatar
rswindell committed
							k = !cfg.ignore_netmail_recv_attr;
							switch(uifc.list(WIN_MID|WIN_SAV,0,0,0,&k,0
								,"Ignore NetMail 'Received' Attribute",uifcYesNoOpts)) {
								case 0:	cfg.ignore_netmail_recv_attr = true;	break;
								case 1:	cfg.ignore_netmail_recv_attr = false;	break;
							}
rswindell's avatar
rswindell committed
						case 9:
rswindell's avatar
rswindell committed
							k = !cfg.ignore_netmail_local_attr;
							switch(uifc.list(WIN_MID|WIN_SAV,0,0,0,&k,0
								,"Ignore NetMail 'Local' Attribute",uifcYesNoOpts)) {
								case 0:	cfg.ignore_netmail_local_attr = true;	break;
								case 1:	cfg.ignore_netmail_local_attr = false;	break;
							}
rswindell's avatar
rswindell committed
						case 10:
rswindell's avatar
rswindell committed
							uifc.helpbuf=
rswindell's avatar
rswindell committed
							"~ Maximum Age of Imported NetMail ~\n\n"
							"Maximum age of NetMail 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"
rswindell's avatar
rswindell committed
							"Set this value to `0` to disable this feature (no maximum age imposed)."
							;
							if(cfg.max_netmail_age)
rswindell's avatar
rswindell committed
								duration_to_vstr(cfg.max_netmail_age, str, sizeof(str));
rswindell's avatar
rswindell committed
							else
								SAFECOPY(str, "None");
rswindell's avatar
rswindell committed
							if(uifc.input(WIN_MID|WIN_BOT|WIN_SAV,0,0,"Maximum NetMail Age"
								,str, 10, K_EDIT) >= 0)
								cfg.max_netmail_age = (ulong)parse_duration(str);
rswindell's avatar
rswindell committed

rswindell's avatar
rswindell committed
			case 4:	/* EchoMail Settings */
rswindell's avatar
rswindell committed
				j=0;
				while(1) {
					uifc.helpbuf=
rswindell's avatar
rswindell committed
	"~ EchoMail Settings ~\n"
	"\n"
	"`Area Manager` is the BBS user name or alias to notify (via email) of\n"
	"    AreaFix activities and errors.  This setting defaults to `SYSOP`.\n"
	"\n"
	"`Maximum Packet Size` is the largest packet file size that SBBSecho will\n"
	"    normally create (in bytes).\n"
	"    This settings defaults to `250K` (250 Kilobytes, or 256,000 bytes).\n"
	"\n"
	"`Maximum Bundle Size` is the largest bundle file size that SBBSecho will\n"
	"    normally create (in bytes).\n"
	"    This settings defaults to `250K` (250 Kilobytes, or 256,000 bytes).\n"
	"\n"
	"`Secure Operation` tells SBBSecho to check the Area File (e.g. areas.bbs)\n"
	"    to insure that the packet origin (FTN address) of EchoMail messages\n"
	"    is already linked to the EchoMail area where the message was posted.\n"
	"    This setting defaults to `No`.\n"
	"\n"
	"`Notify Users of Received EchoMail` tells SBBSecho to send telegrams\n"
	"    (short messages) to BBS users when EchoMail addressed to their name\n"
	"    or alias has been imported into a message base that the user has\n"
	"    access to read.\n"
	"\n"
	"`Convert Existing Tear Lines` tells SBBSecho to convert any tear lines\n"
	"    (`---`) existing in the message text to `===`.\n"
	"    This setting defaults to `No`.\n"
	"\n"
	"`Strip Line Feeds From Outgoing Messages` when set to `Yes` instructs\n"
	"    SBBSecho to remove any line-feed (ASCII 10) characters from the body\n"
	"    text of messages being exported to FidoNet EchoMail.\n"
	"    This setting defaults to `No`.\n"
	"\n"
	"`Automatically Add New Subs to Area File`, when set to `Yes`, enables\n"
	"    SBBSecho to detect newly added Sub-boards in any Message Groups that\n"
	"    are listed with a `Linked Node` as their hub/uplink and add those\n"
	"    Sub-boards as new areas in your Area File.\n"
	"\n"
	"`Allow Nodes to Add Areas from Area File` when set to `Yes` allows linked\n"
	"    nodes to add areas listed in your Area File (e.g. `areas.bbs`).\n"
	"    When set to `No`, only areas found in one or more `EchoLists` may be\n"
	"    added via AreaFix, provided the linked node has access.\n"
	"    This setting defaults to `Yes`.\n"
	"\n"
	"`Maximum Backups to Maintain of Area File` defines the number of backup\n"
	"    versions SBBSecho will maintain of your Area File (e.g. `areas.bbs`).\n"
	"\n"
	"`Circular Path Detection` when `Enabled` will cause SBBSecho, during\n"
	"    EchoMail import, to check the PATH kludge lines for any of the\n"
	"    system's AKAs and if found (indicating a message loop), not import\n"
	"    the message.\n"
	"\n"
	"`Relay Filtered Messages` controls whether or not incoming messages that\n"
	"    have been filtered (e.g. due to maximum message age restrictions)\n"
	"    are to be forwarded to downlinks.\n"
	"\n"
	"`Outbound Bundle Attachments` may be either `Deleted` (killed) or `Truncated`\n"
	"    (changed to 0-bytes in length) after being sent by your mailer.\n"
	"    This only controls the bundle prefix that is written to the FLO\n"
	"    files (`#` for truncate, `^` for delete).\n"
	"\n"
	"`Zone Blind SEEN-BY and PATH Lines` when `Enabled` will cause SBBSecho\n"
	"    to assume that node numbers are not duplicated across zones and\n"
	"    that a net/node combination in either of these Kludge lines should\n"
	"    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"
rswindell's avatar
rswindell committed
	;

rswindell's avatar
rswindell committed
					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");
rswindell's avatar
rswindell committed
					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%-3.3s","Strip Line Feeds "
						"from Outgoing Messages",cfg.strip_lf ? "Yes":"No");
rswindell's avatar
rswindell committed
					snprintf(opt[i++],MAX_OPLN-1,"%-45.45s%-3.3s","Automatically Add New Subs "
						"to Area File",cfg.auto_add_subs ? "Yes":"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);
rswindell's avatar
rswindell committed
					snprintf(opt[i++],MAX_OPLN-1,"%-45.45s%s","Circular Path Detection"
						,cfg.check_path ? "Enabled" : "Disabled");
rswindell's avatar
rswindell committed
					snprintf(opt[i++],MAX_OPLN-1,"%-45.45s%s","Relay Filtered Messages"
						,cfg.relay_filtered_msgs ? "Yes" : "No");
rswindell's avatar
rswindell committed
					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");
rswindell's avatar
rswindell committed
					snprintf(opt[i++],MAX_OPLN-1,"%-45.45s%s","Zone Blind SEEN-BY and PATH Lines", str);
					if(cfg.max_echomail_age)
rswindell's avatar
rswindell committed
						duration_to_vstr(cfg.max_echomail_age, str, sizeof(str));
rswindell's avatar
rswindell committed
					else
						SAFECOPY(str, "None");
rswindell's avatar
rswindell committed
					snprintf(opt[i++],MAX_OPLN-1,"%-45.45s%s","Maximum Age of Imported EchoMail", str);
rswindell's avatar
rswindell committed
					opt[i][0]=0;
rswindell's avatar
rswindell committed
					j=uifc.list(WIN_ACT|WIN_MID|WIN_SAV,0,0,0,&echomail_opt,0,"EchoMail Settings",opt);
rswindell's avatar
rswindell committed
				uifc.helpbuf=
rswindell's avatar
rswindell committed
				"~ Area Manager ~\n\n"
rswindell's avatar
rswindell committed
				"Local user to notify of AreaFix activity and errors.\n";
rswindell's avatar
rswindell committed
							uifc.input(WIN_MID|WIN_BOT|WIN_SAV,0,0,"Area Manager (user name or alias)"
								,cfg.areamgr
								,LEN_ALIAS,K_EDIT);
rswindell's avatar
rswindell committed

rswindell's avatar
rswindell committed
				uifc.helpbuf=
rswindell's avatar
rswindell committed
				"~ 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";
rswindell's avatar
rswindell committed
							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);
rswindell's avatar
rswindell committed

rswindell's avatar
rswindell committed
				uifc.helpbuf=
rswindell's avatar
rswindell committed
				"~ 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";
rswindell's avatar
rswindell committed
							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);
rswindell's avatar
rswindell committed
							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;
							}
							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:
rswindell's avatar
rswindell committed
							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;
							}
rswindell's avatar
rswindell committed
							k = !cfg.strip_lf;
							switch(uifc.list(WIN_MID|WIN_SAV,0,0,0,&k,0
								,"Strip Line Feeds",uifcYesNoOpts)) {
								case 0:	cfg.strip_lf = true;	break;
								case 1:	cfg.strip_lf = false;	break;
							}
rswindell's avatar
rswindell committed
						case 7:
							k = !cfg.auto_add_subs;
							switch(uifc.list(WIN_MID|WIN_SAV,0,0,0,&k,0
								,"Automatically Add New Sub-boards to Area File",uifcYesNoOpts)) {
								case 0:	cfg.auto_add_subs = true;	break;
								case 1:	cfg.auto_add_subs = false;	break;
							}
							break;
rswindell's avatar
rswindell committed
							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 9:
							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 10:
rswindell's avatar
rswindell committed
							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;
							}
rswindell's avatar
rswindell committed
						case 11:
							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 12:
rswindell's avatar
rswindell committed
						{
							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;
							}
rswindell's avatar
rswindell committed
						}
rswindell's avatar
rswindell committed
						case 13:
rswindell's avatar
rswindell committed
							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;
							}
rswindell's avatar
rswindell committed
						case 14:
rswindell's avatar
rswindell committed
							uifc.helpbuf=
rswindell's avatar
rswindell committed
							"~ 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"
rswindell's avatar
rswindell committed
							"Set this value to `0` to disable this feature (no maximum age imposed)."
							;
							if(cfg.max_echomail_age)
rswindell's avatar
rswindell committed
								duration_to_vstr(cfg.max_echomail_age, str, sizeof(str));
rswindell's avatar
rswindell committed
							else
								SAFECOPY(str, "None");
rswindell's avatar
rswindell committed
							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);
rswindell's avatar
rswindell committed

rswindell's avatar
rswindell committed

rswindell's avatar
rswindell committed
			case 2:	/* Archive Types */
rswindell's avatar
rswindell committed
					uifc.helpbuf=
rswindell's avatar
rswindell committed
	"~ 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"
rswindell's avatar
rswindell committed
	"The corresponding archive programs are sometimes referred to as `packers`."
	;
					for(u=0;u<cfg.arcdefs;u++)
rswindell's avatar
rswindell committed
						snprintf(opt[u],MAX_OPLN-1,"%-30.30s",cfg.arcdef[u].name);
					int mode = WIN_SAV | WIN_INS | WIN_DEL | WIN_ACT
						| WIN_INSACT | WIN_DELACT | WIN_XTR;
					if(cfg.arcdefs)
						mode |= WIN_COPY | WIN_CUT;
rswindell's avatar
rswindell committed
					i=uifc.list(mode,0,0,0,&archive_opt,0,"Archive Types",opt);
					int msk = i & MSK_ON;
					i &= MSK_OFF;
					if (msk == MSK_INS) {
						str[0]=0;
	uifc.helpbuf=
rswindell's avatar
rswindell committed
	"~ Archive Type ~\n\n"
	"This is the identifying name of the archiving program (packer).\n";
rswindell's avatar
rswindell committed
							,"Archive Type",str,25,K_EDIT|K_UPPER)<1)
							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]
								,sizeof(arcdef_t));
						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));
rswindell's avatar
rswindell committed
						uifc.helpbuf=
	"Archive Type and Program configuration";
rswindell's avatar
rswindell committed
						snprintf(opt[j++],MAX_OPLN-1,"%-30.30s %s","Archive Type"
							,cfg.arcdef[i].name);
rswindell's avatar
rswindell committed
						snprintf(opt[j++],MAX_OPLN-1,"%-30.30s %s","Signature"
							,cfg.arcdef[i].hexid);
rswindell's avatar
rswindell committed
						snprintf(opt[j++],MAX_OPLN-1,"%-30.30s %u","Signature Offset"
							,cfg.arcdef[i].byteloc);
rswindell's avatar
rswindell committed
						snprintf(opt[j++],MAX_OPLN-1,"%-30.30s %s","Pack Command Line"
							,cfg.arcdef[i].pack);
rswindell's avatar
rswindell committed
						snprintf(opt[j++],MAX_OPLN-1,"%-30.30s %s","Unpack Command Line"
							,cfg.arcdef[i].unpack);
						opt[j][0]=0;
rswindell's avatar
rswindell committed
						SAFEPRINTF(str,"Archive Type - %s", cfg.arcdef[i].name);
rswindell's avatar
rswindell committed
						k=uifc.list(WIN_ACT|WIN_SAV|WIN_RHT|WIN_BOT,0,0,0,&packop,0,str,opt);
						if(k==-1)
							break;
						switch(k) {
							case 0:
rswindell's avatar
rswindell committed
								uifc.helpbuf=
rswindell's avatar
rswindell committed
								"~ 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"
rswindell's avatar
rswindell committed
								"of archive file (e.g. `zip`, `arc`, etc.)."
								;
								uifc.input(WIN_MID|WIN_SAV,0,0
rswindell's avatar
rswindell committed
									,"Archive Type"
									,cfg.arcdef[i].name,sizeof(cfg.arcdef[i].name)-1
									,K_EDIT|K_UPPER);
								break;
							case 1:
rswindell's avatar
rswindell committed
								uifc.helpbuf=
rswindell's avatar
rswindell committed
								"~ 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"
rswindell's avatar
rswindell committed
								"program to extract (unarchive) inbound EchoMail bundle files."
								;
								uifc.input(WIN_MID|WIN_SAV,0,0
rswindell's avatar
rswindell committed
									,"Archive Signature"
									,cfg.arcdef[i].hexid,sizeof(cfg.arcdef[i].hexid)-1
									,K_EDIT|K_UPPER);
								break;
							case 2:
rswindell's avatar
rswindell committed
								uifc.helpbuf=
rswindell's avatar
rswindell committed
								"~ 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"
rswindell's avatar
rswindell committed
								"(unarchive) inbound EchoMail bundle files."
								;
								sprintf(str,"%u",cfg.arcdef[i].byteloc);
rswindell's avatar
rswindell committed
								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);
rswindell's avatar
rswindell committed
								uifc.helpbuf=
rswindell's avatar
rswindell committed
								"~ 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"
rswindell's avatar
rswindell committed
								;
								uifc.input(WIN_MID|WIN_SAV,0,0
rswindell's avatar
rswindell committed
									,"Pack Command Line"
									,cfg.arcdef[i].pack,sizeof(cfg.arcdef[i].pack)-1
rswindell's avatar
rswindell committed
								uifc.helpbuf=
rswindell's avatar
rswindell committed
								"~ 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"
rswindell's avatar
rswindell committed
								"  `%s`  The destination directory for files extracted from the archive\n"
rswindell's avatar
rswindell committed
								"  `%!`  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"
rswindell's avatar
rswindell committed
								;
								uifc.input(WIN_MID|WIN_SAV,0,0
rswindell's avatar
rswindell committed
									,"Unpack Command Line"
									,cfg.arcdef[i].unpack,sizeof(cfg.arcdef[i].unpack)-1
rswindell's avatar
rswindell committed

rswindell's avatar
rswindell committed
			case 6:
	"~ Domains ~\n\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,0,"Domains",opt);
					if(i==-1)
						break;
					int msk = i&MSK_ON;
					i &= MSK_OFF;
					if (msk == MSK_INS) {
						str[0]=0;
	uifc.helpbuf=
	"~ Domain ~\n\n"
	;
						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");
							exit(1); 
						}
						SAFECOPY(cfg.domain_list[i].name, str);
						continue; 
					}

					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;
							continue; 
						}
						for(u=i; u < cfg.domain_count; u++)
							memcpy(&cfg.domain_list[u], &cfg.domain_list[u+1], sizeof(struct fido_domain));
						continue; 
					}
					if (msk == MSK_COPY) {
						memcpy(&savedomain, &cfg.domain_list[i], sizeof(savedomain));
						continue; 
					}
					if (msk == MSK_PASTE) {
						if(!new_domain(i))
							continue;
						memcpy(&cfg.domain_list[i], &savedomain, sizeof(savedomain));
						continue; 
					}
					if (msk != 0)
						continue;
					while(1) {
						j=0;
						uifc.helpbuf=