Skip to content
Snippets Groups Projects
Commit a268b66f authored by rswindell's avatar rswindell
Browse files

Twit list checks no longer effect peformance on systems with no

ctrl/twitlist.cfg file.
parent 012cc1ea
No related branches found
No related tags found
No related merge requests found
...@@ -57,6 +57,10 @@ bool sbbs_t::unpack_qwk(char *packet,uint hubnum) ...@@ -57,6 +57,10 @@ bool sbbs_t::unpack_qwk(char *packet,uint hubnum)
DIR* dir; DIR* dir;
DIRENT* dirent; DIRENT* dirent;
FILE* qwk; FILE* qwk;
BOOL twit_list;
sprintf(fname,"%stwitlist.cfg",cfg.ctrl_dir);
twit_list=fexist(fname);
start=time(NULL); start=time(NULL);
if((l=flength(packet))<1) { if((l=flength(packet))<1) {
...@@ -193,15 +197,18 @@ bool sbbs_t::unpack_qwk(char *packet,uint hubnum) ...@@ -193,15 +197,18 @@ bool sbbs_t::unpack_qwk(char *packet,uint hubnum)
j=cfg.qhub[hubnum]->sub[j]; j=cfg.qhub[hubnum]->sub[j];
/* TWIT FILTER */ /* TWIT FILTER */
sprintf(fname,"%stwitlist.cfg",cfg.ctrl_dir); if(twit_list) {
sprintf(str,"%25.25s",block+46); /* From user */ sprintf(fname,"%stwitlist.cfg",cfg.ctrl_dir);
truncsp(str);
if(findstr(str,fname)) { sprintf(str,"%25.25s",block+46); /* From user */
eprintf("!Filtering post from twit (%s) on %s %s" truncsp(str);
,str
,cfg.grp[cfg.sub[j]->grp]->sname,cfg.sub[j]->lname); if(findstr(str,fname)) {
continue; eprintf("!Filtering post from twit (%s) on %s %s"
,str
,cfg.grp[cfg.sub[j]->grp]->sname,cfg.sub[j]->lname);
continue;
}
} }
if(j!=lastsub) { if(j!=lastsub) {
......
...@@ -57,6 +57,10 @@ bool sbbs_t::unpack_rep(char* repfile) ...@@ -57,6 +57,10 @@ bool sbbs_t::unpack_rep(char* repfile)
FILE* rep; FILE* rep;
DIR* dir; DIR* dir;
DIRENT* dirent; DIRENT* dirent;
BOOL twit_list;
sprintf(fname,"%stwitlist.cfg",cfg.ctrl_dir);
twit_list=fexist(fname);
if(repfile!=NULL) if(repfile!=NULL)
strcpy(str,repfile); strcpy(str,repfile);
...@@ -336,15 +340,17 @@ bool sbbs_t::unpack_rep(char* repfile) ...@@ -336,15 +340,17 @@ bool sbbs_t::unpack_rep(char* repfile)
/* to user name */ /* to user name */
/* TWIT FILTER */ /* TWIT FILTER */
sprintf(fname,"%stwitlist.cfg",cfg.ctrl_dir); if(twit_list) {
sprintf(str,"%25.25s",block+46); /* From user */ sprintf(fname,"%stwitlist.cfg",cfg.ctrl_dir);
truncsp(str); sprintf(str,"%25.25s",block+46); /* From user */
truncsp(str);
if(findstr(str,fname)) {
sprintf(str,"Filtering post from twit (%s) on %s %s" if(findstr(str,fname)) {
,str,cfg.grp[cfg.sub[n]->grp]->sname,cfg.sub[n]->lname); sprintf(str,"Filtering post from twit (%s) on %s %s"
logline("P!",str); ,str,cfg.grp[cfg.sub[n]->grp]->sname,cfg.sub[n]->lname);
continue; logline("P!",str);
continue;
}
} }
if(n!=lastsub) { if(n!=lastsub) {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment