Commit 9afeb9ea authored by Rob Swindell's avatar Rob Swindell 💬
Browse files

Add option to control whether area-linked nodes must be configured

This should address issue # 261.
Before April 19, 2016, area-linked nodes were required to be listed as nodes in sbbsecho.ini:
I'm not sure why the change was made to only require that there be a wildmatch for each area-linked node. So just make it a configuration option. <shrug>

Also removed the trailing "..." for every top level menu item in echocfg.
parent fd649bf8
Pipeline #2135 passed with stage
in 8 minutes and 26 seconds
......@@ -833,15 +833,15 @@ int main(int argc, char **argv)
"`Area File` (e.g. areas.bbs) for advanced AreaFix/AreaMgr operations."
sprintf(opt[i++],"Global Settings...");
sprintf(opt[i++],"Linked Nodes...");
sprintf(opt[i++],"Archive Types...");
sprintf(opt[i++],"NetMail Settings...");
sprintf(opt[i++],"EchoMail Settings...");
sprintf(opt[i++],"Paths and Filenames...");
sprintf(opt[i++],"Global Settings");
sprintf(opt[i++],"Linked Nodes");
sprintf(opt[i++],"Archive Types");
sprintf(opt[i++],"NetMail Settings");
sprintf(opt[i++],"EchoMail Settings");
sprintf(opt[i++],"Paths and Filenames");
if(uifc.changes && !cfg.used_include)
snprintf(opt[i++],MAX_OPLN-1,"Save Changes to %s", getfname(cfg.cfgfile));
......@@ -1851,6 +1851,10 @@ int main(int argc, char **argv)
"`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"
"`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"
......@@ -1887,6 +1891,8 @@ int main(int argc, char **argv)
SAFECOPY(str, "None");
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_MID|WIN_SAV,0,0,0,&echomail_opt,0,"EchoMail Settings",opt);
......@@ -2040,7 +2046,14 @@ int main(int argc, char **argv)
,str, 10, K_EDIT) >= 0)
cfg.max_echomail_age = (ulong)parse_duration(str);
case 14:
k = !cfg.require_linked_node_cfg;
,"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;
......@@ -217,6 +217,7 @@ void get_default_echocfg(sbbsecho_cfg_t* cfg)
cfg->auto_add_to_areafile = true;
cfg->auto_utf8 = true;
cfg->strip_soft_cr = true;
cfg->require_linked_node_cfg = true;
cfg->min_free_diskspace = 10*1024*1024;
cfg->max_logs_kept = 10;
cfg->max_log_size = 10*1024*1024;
......@@ -290,6 +291,7 @@ bool sbbsecho_read_ini(sbbsecho_cfg_t* cfg)
SAFECOPY(cfg->areamgr, iniGetString(ini, ROOT_SECTION, "AreaManager", "SYSOP", value));
cfg->auto_add_subs = iniGetBool(ini, ROOT_SECTION, "AutoAddSubs", cfg->auto_add_subs);
cfg->auto_add_to_areafile = iniGetBool(ini, ROOT_SECTION, "AutoAddToAreaFile", cfg->auto_add_to_areafile);
cfg->require_linked_node_cfg= iniGetBool(ini, ROOT_SECTION, "RequireLinkedNodeCfg", cfg->require_linked_node_cfg);
/* NetMail options: */
SAFECOPY(cfg->default_recipient, iniGetString(ini, ROOT_SECTION, "DefaultRecipient", "", value));
......@@ -550,6 +552,7 @@ bool sbbsecho_write_ini(sbbsecho_cfg_t* cfg)
iniSetBool(&ini, ROOT_SECTION, "AreaAddFromEcholistsOnly",cfg->add_from_echolists_only ,style);
iniSetBool(&ini, ROOT_SECTION, "AutoAddSubs" ,cfg->auto_add_subs ,style);
iniSetBool(&ini, ROOT_SECTION, "AutoAddToAreaFile" ,cfg->auto_add_to_areafile ,style);
iniSetBool(&ini, ROOT_SECTION, "RequireLinkedNodeCfg" ,cfg->require_linked_node_cfg ,style);
iniSetDuration(&ini, ROOT_SECTION, "BsyTimeout" ,cfg->bsy_timeout ,style);
iniSetDuration(&ini, ROOT_SECTION, "BsoLockDelay" ,cfg->bso_lock_delay ,style);
iniSetLongInt(&ini, ROOT_SECTION, "BsoLockAttempts" ,cfg->bso_lock_attempts ,style);
......@@ -6388,7 +6388,7 @@ int main(int argc, char **argv)
fidoaddr_t link = atofaddr(p);
cfg.area[areanum].link[cfg.area[areanum].links] = link;
if(findnodecfg(&cfg, link, /* exact: */false) == NULL) {
if(findnodecfg(&cfg, link, /* exact: */cfg.require_linked_node_cfg) == NULL) {
lprintf(LOG_WARNING, "Configuration for %s-linked-node (%s) not found in %s"
,cfg.area[areanum].tag, faddrtoa(&link), cfg.cfgfile);
......@@ -210,6 +210,7 @@ typedef struct {
bool auto_add_to_areafile;
bool auto_utf8;
bool use_outboxes;
bool require_linked_node_cfg;
ulong bsy_timeout;
ulong bso_lock_attempts;
ulong bso_lock_delay; /* in seconds */
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment