Commit f73c9ad2 authored by rswindell's avatar rswindell
Browse files

Changed protocol 'cd' arg to bool.

parent a119bf87
......@@ -141,7 +141,7 @@ bool sbbs_t::email(int usernumber, char *top, char *subj, long mode)
&& chk_ar(cfg.prot[x]->ar,&useron))
break;
if(x<cfg.total_prots) /* This should be always */
protocol(cmdstr(cfg.prot[x]->ulcmd,str2,nulstr,NULL),0); }
protocol(cmdstr(cfg.prot[x]->ulcmd,str2,nulstr,NULL),true); }
l=flength(str2);
if(l>0)
bprintf(text[FileNBytesReceived],title,ultoac(l,tmp));
......
......@@ -648,7 +648,7 @@ int sbbs_t::exec_function(csi_t *csi)
if(cfg.prot[i]->mnemonic==ch && chk_ar(cfg.prot[i]->ar,&useron))
break;
if(i<cfg.total_prots) {
protocol(cmdstr(cfg.prot[i]->dlcmd,csi->str,csi->str,str),0);
protocol(cmdstr(cfg.prot[i]->dlcmd,csi->str,csi->str,str),false);
autohangup(); }
return(0);
......@@ -672,7 +672,7 @@ int sbbs_t::exec_function(csi_t *csi)
if(cfg.prot[i]->mnemonic==ch && chk_ar(cfg.prot[i]->ar,&useron))
break;
if(i<cfg.total_prots) {
protocol(cmdstr(cfg.prot[i]->ulcmd,csi->str,csi->str,str),0);
protocol(cmdstr(cfg.prot[i]->ulcmd,csi->str,csi->str,str),true);
autohangup(); }
return(0);
......
......@@ -252,7 +252,7 @@ bool sbbs_t::netmail(char *into, char *title, long mode)
&& chk_ar(cfg.prot[x]->ar,&useron))
break;
if(x<cfg.total_prots) /* This should be always */
protocol(cmdstr(cfg.prot[x]->ulcmd,subj,nulstr,NULL),0); }
protocol(cmdstr(cfg.prot[x]->ulcmd,subj,nulstr,NULL),true); }
l=flength(subj);
if(l>0)
bprintf(text[FileNBytesReceived],fname,ultoac(l,tmp));
......
......@@ -1247,7 +1247,7 @@ int sbbs_t::listfileinfo(uint dirnum, char *filespec, long mode)
thisnode.aux=(tm->tm_hour*60)+tm->tm_min;
putnodedat(cfg.node_num,&thisnode); /* calculate ETA */
start=time(NULL);
j=protocol(cmdstr(cfg.prot[i]->dlcmd,path,nulstr,NULL),0);
j=protocol(cmdstr(cfg.prot[i]->dlcmd,path,nulstr,NULL),false);
end=time(NULL);
if(cfg.dir[f.dir]->misc&DIR_TFREE)
starttime+=end-start;
......
......@@ -130,7 +130,7 @@ bool sbbs_t::inetmail(char *into, char *subj, long mode)
&& chk_ar(cfg.prot[x]->ar,&useron))
break;
if(x<cfg.total_prots) /* This should be always */
protocol(cmdstr(cfg.prot[x]->ulcmd,str2,nulstr,NULL),0); }
protocol(cmdstr(cfg.prot[x]->ulcmd,str2,nulstr,NULL),true); }
l=flength(str2);
if(l>0)
bprintf(text[FileNBytesReceived],title,ultoac(l,tmp));
......
......@@ -575,7 +575,7 @@ void sbbs_t::qwk_sec()
padfname(tmp2,fd.name);
sprintf(str,"%sBATCHDN.LST",cfg.node_dir);
sprintf(tmp2,"%sBATCHUP.LST",cfg.node_dir);
j=protocol(cmdstr(cfg.prot[i]->bicmd,str,tmp2,NULL),0);
j=protocol(cmdstr(cfg.prot[i]->bicmd,str,tmp2,NULL),true);
batdn_total=batup_total=0;
if(cfg.prot[i]->misc&PROT_DSZLOG) {
if(!checkprotlog(&fd)) {
......@@ -672,7 +672,7 @@ void sbbs_t::qwk_sec()
sprintf(str,"%s%s.qwk",cfg.temp_dir,cfg.sys_id);
sprintf(tmp2,"%s.qwk",cfg.sys_id);
padfname(tmp2,fd.name);
j=protocol(cmdstr(cfg.prot[i]->dlcmd,str,nulstr,NULL),0);
j=protocol(cmdstr(cfg.prot[i]->dlcmd,str,nulstr,NULL),false);
if(cfg.prot[i]->misc&PROT_DSZLOG) {
if(!checkprotlog(&fd)) {
last_ns_time=ns_time;
......@@ -748,7 +748,7 @@ void sbbs_t::qwk_sec()
if(i>=cfg.total_prots) /* This shouldn't happen */
continue;
sprintf(str,"%s%s.rep",cfg.temp_dir,cfg.sys_id);
protocol(cmdstr(cfg.prot[i]->ulcmd,str,nulstr,NULL),0);
protocol(cmdstr(cfg.prot[i]->ulcmd,str,nulstr,NULL),true);
unpack_rep();
delfiles(cfg.temp_dir,ALLFILES);
//autohangup();
......
......@@ -257,8 +257,7 @@ void sbbs_t::readmail(uint usernumber, int which)
&& chk_ar(cfg.prot[i]->ar,&useron))
break;
if(i<cfg.total_prots) {
j=protocol(cmdstr(cfg.prot[i]->dlcmd,str2,nulstr
,NULL),0);
j=protocol(cmdstr(cfg.prot[i]->dlcmd,str2,nulstr,NULL),false);
if((cfg.prot[i]->misc&PROT_DSZLOG
&& checkprotlog(&fd))
|| (!(cfg.prot[i]->misc&PROT_DSZLOG) && !j)) {
......
......@@ -546,7 +546,7 @@ public:
/* download.cpp */
void downloadfile(file_t* f);
void notdownloaded(ulong size, time_t start, time_t end);
int protocol(char *cmdline, int cd);
int protocol(char *cmdline, bool cd);
void seqwait(uint devnum);
void autohangup(void);
bool checkprotlog(file_t* f);
......
......@@ -470,7 +470,7 @@ void sbbs_t::upload(uint dirnum)
break;
if(i<cfg.total_prots) {
start=time(NULL);
protocol(cmdstr(cfg.prot[i]->ulcmd,str,nulstr,NULL),0);
protocol(cmdstr(cfg.prot[i]->ulcmd,str,nulstr,NULL),true);
end=time(NULL);
if(!(cfg.dir[dirnum]->misc&DIR_ULTIME)) /* Don't deduct upload time */
starttime+=end-start;
......
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