Added full newsgroup compile switch
This commit is contained in:
@@ -487,10 +487,17 @@ int postecho(faddr *p_from, faddr *f, faddr *t, char *orig, char *subj, time_t m
|
||||
}
|
||||
}
|
||||
|
||||
#ifdef USE_NEWSGATE
|
||||
/*
|
||||
* Gate to newsserver
|
||||
*/
|
||||
if (strlen(msgs.Newsgroup) && tonews) {
|
||||
#else
|
||||
/*
|
||||
* Gate to newsserver if this is a real newsgroup
|
||||
*/
|
||||
if (strlen(msgs.Newsgroup) && (msgs.Type == NEWS) && tonews) {
|
||||
#endif
|
||||
rewind(nfp);
|
||||
qp = tmpfile();
|
||||
while ((fgets(buf, MAX_LINE_LENGTH, nfp)) != NULL) {
|
||||
|
@@ -282,8 +282,12 @@ void ScanFull()
|
||||
if (Link.aka.zone)
|
||||
ExportEcho(Link, Number, &sbl);
|
||||
}
|
||||
#ifdef USE_NEWSGATE
|
||||
if (strlen(msgs.Newsgroup))
|
||||
#else
|
||||
if (strlen(msgs.Newsgroup) && (msgs.Type == NEWS))
|
||||
ExportNews(Number, &sbl);
|
||||
#endif
|
||||
ExportNews(Number, &sbl);
|
||||
|
||||
tidy_falist(&sbl);
|
||||
}
|
||||
@@ -439,8 +443,12 @@ void ScanOne(char *path, unsigned long MsgNum)
|
||||
ExportEcho(Link, MsgNum, &sbl);
|
||||
}
|
||||
}
|
||||
#ifdef USE_NEWSGATE
|
||||
if (strlen(msgs.Newsgroup))
|
||||
#else
|
||||
if (strlen(msgs.Newsgroup) && (msgs.Type == NEWS))
|
||||
ExportNews(MsgNum, &sbl);
|
||||
#endif
|
||||
ExportNews(MsgNum, &sbl);
|
||||
|
||||
tidy_falist(&sbl);
|
||||
}
|
||||
|
@@ -205,7 +205,11 @@ void ScanNews(void)
|
||||
|
||||
while (fread(&Msgs, Msgshdr.recsize, 1, pAreas) == 1) {
|
||||
fseek(pAreas, Msgshdr.syssize, SEEK_CUR);
|
||||
#ifdef USE_NEWSGATE
|
||||
if ((Msgs.Active) && strlen(Msgs.Newsgroup)) {
|
||||
#else
|
||||
if ((Msgs.Active) && strlen(Msgs.Newsgroup) && (Msgs.Type == NEWS)) {
|
||||
#endif
|
||||
if (IsSema((char *)"upsalarm")) {
|
||||
Syslog('+', "Detected upsalarm semafore, aborting newsscan");
|
||||
break;
|
||||
|
Reference in New Issue
Block a user