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)
DIR* dir;
DIRENT* dirent;
FILE* qwk;
BOOL twit_list;
sprintf(fname,"%stwitlist.cfg",cfg.ctrl_dir);
twit_list=fexist(fname);
start=time(NULL);
if((l=flength(packet))<1) {
......@@ -193,15 +197,18 @@ bool sbbs_t::unpack_qwk(char *packet,uint hubnum)
j=cfg.qhub[hubnum]->sub[j];
/* TWIT FILTER */
sprintf(fname,"%stwitlist.cfg",cfg.ctrl_dir);
sprintf(str,"%25.25s",block+46); /* From user */
truncsp(str);
if(twit_list) {
sprintf(fname,"%stwitlist.cfg",cfg.ctrl_dir);
if(findstr(str,fname)) {
eprintf("!Filtering post from twit (%s) on %s %s"
,str
,cfg.grp[cfg.sub[j]->grp]->sname,cfg.sub[j]->lname);
continue;
sprintf(str,"%25.25s",block+46); /* From user */
truncsp(str);
if(findstr(str,fname)) {
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) {
......
......@@ -57,6 +57,10 @@ bool sbbs_t::unpack_rep(char* repfile)
FILE* rep;
DIR* dir;
DIRENT* dirent;
BOOL twit_list;
sprintf(fname,"%stwitlist.cfg",cfg.ctrl_dir);
twit_list=fexist(fname);
if(repfile!=NULL)
strcpy(str,repfile);
......@@ -336,15 +340,17 @@ bool sbbs_t::unpack_rep(char* repfile)
/* to user name */
/* TWIT FILTER */
sprintf(fname,"%stwitlist.cfg",cfg.ctrl_dir);
sprintf(str,"%25.25s",block+46); /* From user */
truncsp(str);
if(findstr(str,fname)) {
sprintf(str,"Filtering post from twit (%s) on %s %s"
,str,cfg.grp[cfg.sub[n]->grp]->sname,cfg.sub[n]->lname);
logline("P!",str);
continue;
if(twit_list) {
sprintf(fname,"%stwitlist.cfg",cfg.ctrl_dir);
sprintf(str,"%25.25s",block+46); /* From user */
truncsp(str);
if(findstr(str,fname)) {
sprintf(str,"Filtering post from twit (%s) on %s %s"
,str,cfg.grp[cfg.sub[n]->grp]->sname,cfg.sub[n]->lname);
logline("P!",str);
continue;
}
}
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