Synchronet now requires the libarchive development package (e.g. libarchive-dev on Debian-based Linux distros, libarchive.org for more info) to build successfully.

Commit 65cbbb3d authored by rswindell's avatar rswindell

New "day of month" property for timed events, allows events to only run on

the first day of the month (for example). Default is "Any" for any/all days of
the month.
parent c1a47be9
......@@ -1639,7 +1639,8 @@ void event_thread(void* arg)
|| (!sbbs->cfg.event[i]->freq
&& (now_tm.tm_hour*60)+now_tm.tm_min>=sbbs->cfg.event[i]->time
&& (now_tm.tm_mday!=tm.tm_mday || now_tm.tm_mon!=tm.tm_mon)))
&& sbbs->cfg.event[i]->days&(1<<now_tm.tm_wday)))
&& sbbs->cfg.event[i]->days&(1<<now_tm.tm_wday)
&& (sbbs->cfg.event[i]->mday==0 || sbbs->cfg.event[i]->mday==now_tm.tm_mday)))
{
if(sbbs->cfg.event[i]->misc&EVENT_EXCL) { /* exclusive event */
......
......@@ -288,7 +288,8 @@ typedef struct { /* External Editors */
typedef struct { /* Generic Timed Event */
char code[LEN_CODE+1], /* Internal code */
days, /* Days to run event */
days, /* week days to run event */
mday, /* day of month (if non-zero) to run event */
dir[LEN_DIR+1], /* Start-up directory */
cmd[LEN_CMD+1]; /* Command line */
ushort node, /* Node to execute event */
......
......@@ -596,8 +596,10 @@ BOOL read_xtrn_cfg(scfg_t* cfg, char* error)
get_int(cfg->event[i]->misc,instream);
get_str(cfg->event[i]->dir,instream);
get_int(cfg->event[i]->freq,instream);
get_int(cfg->event[i]->mday,instream);
for(j=0;j<7;j++)
get_int(c,instream);
for(j=0;j<6;j++)
get_int(n,instream);
}
cfg->total_events=i;
......
......@@ -1020,8 +1020,11 @@ BOOL DLLCALL write_xtrn_cfg(scfg_t* cfg, int backup_level)
put_int(cfg->event[i]->misc,stream);
put_int(cfg->event[i]->dir,stream);
put_int(cfg->event[i]->freq,stream);
put_int(cfg->event[i]->mday,stream);
c=0;
put_int(c,stream);
n=0;
for(j=0;j<7;j++)
for(j=0;j<6;j++)
put_int(n,stream);
}
......
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