Commit 13f1377b authored by rswindell's avatar rswindell
Browse files

Added new directory toggle option to disable download notification messages

(for Corey).
parent 7f79569b
......@@ -83,19 +83,19 @@ void sbbs_t::downloadfile(file_t* f)
mod=((ulong)(l*(cfg.dir[f->dir]->dn_pct/100.0))/cur_cps)/60;
adjustuserrec(&cfg,i,U_MIN,10,mod);
sprintf(tmp,"%lu minute",mod);
sprintf(str,text[DownloadUserMsg]
,!strcmp(cfg.dir[f->dir]->code,"TEMP") ? temp_file : f->name
,!strcmp(cfg.dir[f->dir]->code,"TEMP") ? text[Partially] : nulstr
,useron.alias,tmp); }
else {
} else {
mod=(ulong)(l*(cfg.dir[f->dir]->dn_pct/100.0));
adjustuserrec(&cfg,i,U_CDT,10,mod);
ultoac(mod,tmp);
}
if(!(cfg.dir[f->dir]->misc&DIR_QUIET)) {
sprintf(str,text[DownloadUserMsg]
,!strcmp(cfg.dir[f->dir]->code,"TEMP") ? temp_file : f->name
,!strcmp(cfg.dir[f->dir]->code,"TEMP") ? text[Partially] : nulstr
,useron.alias,tmp); }
putsmsg(&cfg,i,str); }
,useron.alias,tmp);
putsmsg(&cfg,i,str);
}
}
/*******************/
/* Update IXB File */
/*******************/
......
......@@ -1534,12 +1534,14 @@ static void send_thread(void* arg)
adjustuserrec(&scfg,uploader.number,U_CDT,10,mod);
ultoac(mod,tmp);
}
/* Inform uploader of downloaded file */
sprintf(str,text[DownloadUserMsg]
,getfname(xfer.filename)
,xfer.filepos ? "partially FTP-" : "FTP-"
,xfer.user->alias,tmp);
putsmsg(&scfg,uploader.number,str);
if(!(scfg.dir[f.dir]->misc&DIR_QUIET)) {
/* Inform uploader of downloaded file */
sprintf(str,text[DownloadUserMsg]
,getfname(xfer.filename)
,xfer.filepos ? "partially FTP-" : "FTP-"
,xfer.user->alias,tmp);
putsmsg(&scfg,uploader.number,str);
}
}
}
/* Need to update datedled in index */
......
......@@ -279,6 +279,7 @@
#define DIR_CDTMIN (1L<<15) /* Give uploader minutes instead of cdt */
#define DIR_SINCEDL (1L<<16) /* Purge based on days since last dl */
#define DIR_MOVENEW (1L<<17) /* Files marked as new when moved */
#define DIR_QUIET (1L<<18) /* Do not notify uploader of downloads */
/* Bit values for file_t.misc */
#define FM_EXTDESC (1<<0) /* Extended description exists */
......
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