Commit 884c19fb authored by rswindell's avatar rswindell
Browse files

EchoStats filename (data/echostats.ini) is now configurable.

EchoStats now contain message timezones (when written) and a "known" flag
(bad echoes have known = false).
EchoStats are now sorted before being written to the EchoStats file.
Fixed bug in getfmsg(): trailing ex-ASCII chars of the message body would be
chopped-off - go back to using a uchar.
Re-worked packed-msg import parsing and grunged message detection a bit to
log more msg details for all EchoStats.
Added "AutoAddSubs" feature (set to true in sbbsecho.ini to enable):
- If sub-boards are created (e.g. with SCFG) in one or more message groups, the
  areas can be automatically added to your Area File (areas.bbs)
- The hub must be first configured in EchoCfg->Linked Nodes and then you set
  the GroupHub key in sbbsecho.ini to the name of the message group that this
  link is the hub for (e.g. "FidoNet"). You can specify multiple groups, if
  necessary, by comma-separating the names.
parent 71554453
......@@ -253,6 +253,7 @@ bool sbbsecho_read_ini(sbbsecho_cfg_t* cfg)
SAFECOPY(cfg->outbound , iniGetString(ini, ROOT_SECTION, "Outbound", "../fido/outbound", value));
SAFECOPY(cfg->areafile , iniGetString(ini, ROOT_SECTION, "AreaFile", "../data/areas.bbs", value));
SAFECOPY(cfg->badareafile , iniGetString(ini, ROOT_SECTION, "BadAreaFile", "../data/badareas.lst", value));
SAFECOPY(cfg->echostats , iniGetString(ini, ROOT_SECTION, "EchoStats", "../data/echostats.ini", value));
SAFECOPY(cfg->logfile , iniGetString(ini, ROOT_SECTION, "LogFile", "../data/sbbsecho.log", value));
SAFECOPY(cfg->logtime , iniGetString(ini, ROOT_SECTION, "LogTimeFormat", "%Y-%m-%d %H:%M:%S", value));
SAFECOPY(cfg->temp_dir , iniGetString(ini, ROOT_SECTION, "TempDirectory", "../temp/sbbsecho", value));
......@@ -282,6 +283,7 @@ bool sbbsecho_read_ini(sbbsecho_cfg_t* cfg)
cfg->add_from_echolists_only= iniGetBool(ini, ROOT_SECTION, "AreaAddFromEcholistsOnly", cfg->add_from_echolists_only);
cfg->max_echomail_age = (ulong)iniGetDuration(ini, ROOT_SECTION, "MaxEchomailAge", cfg->max_echomail_age);
SAFECOPY(cfg->areamgr, iniGetString(ini, ROOT_SECTION, "AreaManager", "SYSOP", value));
cfg->auto_add_subs = iniGetBool(ini, ROOT_SECTION, "AutoAddSubs", cfg->auto_add_subs);
/* NetMail options: */
SAFECOPY(cfg->default_recipient, iniGetString(ini, ROOT_SECTION, "DefaultRecipient", "", value));
......@@ -353,6 +355,7 @@ bool sbbsecho_read_ini(sbbsecho_cfg_t* cfg)
if (stricmp(outbound, outbox) == 0)
ncfg->outbox[0] = 0;
ncfg->grphub = iniGetStringList(ini, node, "GroupHub", ",", "");
ncfg->keys = iniGetStringList(ini, node, "keys", ",", "");
ncfg->pkt_type = iniGetEnum(ini, node, "PacketType", pktTypeStringList, ncfg->pkt_type);
ncfg->send_notify = iniGetBool(ini, node, "notify", ncfg->send_notify);
......@@ -475,6 +478,7 @@ bool sbbsecho_write_ini(sbbsecho_cfg_t* cfg)
iniSetString(&ini, ROOT_SECTION, "AreaFile" ,cfg->areafile ,NULL);
iniSetInteger(&ini, ROOT_SECTION, "AreaFileBackups" ,cfg->areafile_backups ,NULL);
iniSetString(&ini, ROOT_SECTION, "BadAreaFile" ,cfg->badareafile ,NULL);
iniSetString(&ini, ROOT_SECTION, "EchoStats" ,cfg->echostats ,NULL);
iniSetString(&ini, ROOT_SECTION, "LogFile" ,cfg->logfile ,NULL);
......@@ -497,6 +501,7 @@ bool sbbsecho_write_ini(sbbsecho_cfg_t* cfg)
iniSetBool(&ini, ROOT_SECTION, "BinkleyStyleOutbound" ,cfg->flo_mailer ,NULL);
iniSetBool(&ini, ROOT_SECTION, "TruncateBundles" ,cfg->trunc_bundles ,NULL);
iniSetBool(&ini, ROOT_SECTION, "AreaAddFromEcholistsOnly",cfg->add_from_echolists_only ,NULL);
iniSetBool(&ini, ROOT_SECTION, "AutoAddSubs" ,cfg->auto_add_subs ,NULL);
iniSetDuration(&ini, ROOT_SECTION, "BsyTimeout" ,cfg->bsy_timeout ,NULL);
iniSetDuration(&ini, ROOT_SECTION, "BsoLockDelay" ,cfg->bso_lock_delay ,NULL);
iniSetLongInt(&ini, ROOT_SECTION, "BsoLockAttempts" ,cfg->bso_lock_attempts ,NULL);
......@@ -556,6 +561,7 @@ bool sbbsecho_write_ini(sbbsecho_cfg_t* cfg)
iniSetString(&ini,section, "Route" ,faddrtoa(&node->route), &style);
iniRemoveKey(&ini,section, "Route");
iniSetStringList(&ini, section, "GroupHub", "," ,node->grphub ,&style);
This diff is collapsed.
......@@ -106,6 +106,7 @@ typedef struct {
enum mail_status status;
arcdef_t* archive;
str_list_t grphub; /* This link is hub of these groups (short names */
} nodecfg_t;
typedef struct {
......@@ -135,6 +136,7 @@ typedef struct {
char areafile[MAX_PATH+1]; /* Area file (default: data/areas.bbs) */
uint areafile_backups; /* Number of backups to keep of area file */
char badareafile[MAX_PATH+1];/* Bad area file (default: data/badareas.lst) */
char echostats[MAX_PATH+1]; /* Echo statistics (default: data/echostats.ini) */
char logfile[MAX_PATH+1]; /* LOG path/filename */
char logtime[64]; /* format of log timestamp */
char cfgfile[MAX_PATH+1]; /* Configuration path/filename */
......@@ -178,6 +180,7 @@ typedef struct {
bool ignore_netmail_local_attr;
bool use_ftn_domains;
bool relay_filtered_msgs;
bool auto_add_subs;
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