Added full newsgroup compile switch

This commit is contained in:
Michiel Broek
2004-06-20 14:38:11 +00:00
parent 44ecaf41b7
commit 58876c0fe3
25 changed files with 121 additions and 25 deletions

View File

@@ -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) {

View File

@@ -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);
}

View File

@@ -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;