Code cleanup
This commit is contained in:
parent
26014af40c
commit
f4df56ab59
@ -1606,6 +1606,8 @@ void BlueWave_Fetch()
|
|||||||
REQ_REC Req;
|
REQ_REC Req;
|
||||||
int i, Found, OLC_head, OLC_filter, OLC_macro, OLC_keyword, HEAD_written;
|
int i, Found, OLC_head, OLC_filter, OLC_macro, OLC_keyword, HEAD_written;
|
||||||
fidoaddr dest;
|
fidoaddr dest;
|
||||||
|
time_t now;
|
||||||
|
struct tm *tm;
|
||||||
|
|
||||||
colour(9, 0);
|
colour(9, 0);
|
||||||
/* Processing BlueWave reply packet */
|
/* Processing BlueWave reply packet */
|
||||||
@ -1634,6 +1636,7 @@ void BlueWave_Fetch()
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
Syslog('+', "Login %s, Alias %s", Uph.loginname, Uph.aliasname);
|
Syslog('+', "Login %s, Alias %s", Uph.loginname, Uph.aliasname);
|
||||||
|
Syslog('m', "Tear: %s", Uph.reader_tear);
|
||||||
/* MORE CHECKS HERE */
|
/* MORE CHECKS HERE */
|
||||||
|
|
||||||
colour(CFG.TextColourF, CFG.TextColourB);
|
colour(CFG.TextColourF, CFG.TextColourB);
|
||||||
@ -1650,7 +1653,10 @@ void BlueWave_Fetch()
|
|||||||
Syslog('m', " From : %s", Upr.from);
|
Syslog('m', " From : %s", Upr.from);
|
||||||
Syslog('m', " To : %s", Upr.to);
|
Syslog('m', " To : %s", Upr.to);
|
||||||
Syslog('m', " Subj : %s", Upr.subj);
|
Syslog('m', " Subj : %s", Upr.subj);
|
||||||
Syslog('m', " Date : %ld", Upr.unix_date);
|
now = Upr.unix_date;
|
||||||
|
tm = gmtime(&now);
|
||||||
|
Syslog('m', " Date : %02d-%02d-%d %02d:%02d:%02d", tm->tm_mday, tm->tm_mon+1,
|
||||||
|
tm->tm_year+1900, tm->tm_hour, tm->tm_min, tm->tm_sec);
|
||||||
Syslog('m', " Dest : %d:%d/%d.%d", Upr.destzone, Upr.destnet, Upr.destnode, Upr.destpoint);
|
Syslog('m', " Dest : %d:%d/%d.%d", Upr.destzone, Upr.destnet, Upr.destnode, Upr.destpoint);
|
||||||
if (Upr.msg_attr & UPL_INACTIVE)
|
if (Upr.msg_attr & UPL_INACTIVE)
|
||||||
Syslog('m', " Message is Inactive");
|
Syslog('m', " Message is Inactive");
|
||||||
@ -1704,7 +1710,6 @@ void BlueWave_Fetch()
|
|||||||
|
|
||||||
if (Open_Msgbase(msgs.Base, 'w')) {
|
if (Open_Msgbase(msgs.Base, 'w')) {
|
||||||
Msg_New();
|
Msg_New();
|
||||||
Syslog('m', "Msgbase open and locked");
|
|
||||||
strcpy(Msg.From, Upr.from);
|
strcpy(Msg.From, Upr.from);
|
||||||
strcpy(Msg.To, Upr.to);
|
strcpy(Msg.To, Upr.to);
|
||||||
strcpy(Msg.Subject, Upr.subj);
|
strcpy(Msg.Subject, Upr.subj);
|
||||||
@ -1719,14 +1724,12 @@ void BlueWave_Fetch()
|
|||||||
dest.net = Upr.destnet;
|
dest.net = Upr.destnet;
|
||||||
dest.node = Upr.destnode;
|
dest.node = Upr.destnode;
|
||||||
dest.point = Upr.destpoint;
|
dest.point = Upr.destpoint;
|
||||||
Syslog('m', "Header fields are set, starting kludges");
|
|
||||||
Add_Kludges(dest, FALSE, Upr.filename);
|
Add_Kludges(dest, FALSE, Upr.filename);
|
||||||
Syslog('+', "Msg (%ld) to \"%s\", \"%s\", in %s", Msg.Id, Msg.To, Msg.Subject, msgs.QWKname);
|
Syslog('+', "Msg (%ld) to \"%s\", \"%s\", in %s", Msg.Id, Msg.To, Msg.Subject, msgs.QWKname);
|
||||||
sprintf(temp, "%s/%s/%s", CFG.bbs_usersdir, exitinfo.Name, Upr.filename);
|
sprintf(temp, "%s/%s/%s", CFG.bbs_usersdir, exitinfo.Name, Upr.filename);
|
||||||
unlink(temp);
|
unlink(temp);
|
||||||
i++;
|
i++;
|
||||||
Close_Msgbase();
|
Close_Msgbase();
|
||||||
Syslog('m', "Msgbase closed again");
|
|
||||||
fseek(mf, - (msgshdr.recsize + msgshdr.syssize), SEEK_CUR);
|
fseek(mf, - (msgshdr.recsize + msgshdr.syssize), SEEK_CUR);
|
||||||
msgs.Posted.total++;
|
msgs.Posted.total++;
|
||||||
msgs.Posted.tweek++;
|
msgs.Posted.tweek++;
|
||||||
@ -1801,7 +1804,6 @@ void BlueWave_Fetch()
|
|||||||
/*
|
/*
|
||||||
* Process offline configuration
|
* Process offline configuration
|
||||||
*/
|
*/
|
||||||
|
|
||||||
sprintf(temp, "%s/%s/%s.OLC", CFG.bbs_usersdir, exitinfo.Name, CFG.bbsid);
|
sprintf(temp, "%s/%s/%s.OLC", CFG.bbs_usersdir, exitinfo.Name, CFG.bbsid);
|
||||||
if ((iol = fopen(temp, "r")) == NULL) {
|
if ((iol = fopen(temp, "r")) == NULL) {
|
||||||
temp = tl(temp);
|
temp = tl(temp);
|
||||||
@ -1841,9 +1843,7 @@ void BlueWave_Fetch()
|
|||||||
buffer+=11;
|
buffer+=11;
|
||||||
while (isspace(buffer[0]) || buffer[0]=='=')
|
while (isspace(buffer[0]) || buffer[0]=='=')
|
||||||
buffer++;
|
buffer++;
|
||||||
if ((strncasecmp(buffer,"TRUE",4)==0)
|
if ((strncasecmp(buffer,"TRUE",4)==0) || (strncasecmp(buffer,"YES",3)==0) || (strncasecmp(buffer,"ON",2)==0))
|
||||||
|| (strncasecmp(buffer,"YES",3)==0)
|
|
||||||
|| (strncasecmp(buffer,"ON",2)==0))
|
|
||||||
Pdh.flags |= PDQ_AREA_CHANGES;
|
Pdh.flags |= PDQ_AREA_CHANGES;
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
@ -1851,9 +1851,7 @@ void BlueWave_Fetch()
|
|||||||
buffer+=11;
|
buffer+=11;
|
||||||
while (isspace(buffer[0]) || buffer[0]=='=')
|
while (isspace(buffer[0]) || buffer[0]=='=')
|
||||||
buffer++;
|
buffer++;
|
||||||
if ((strncasecmp(buffer,"TRUE",4)==0)
|
if ((strncasecmp(buffer,"TRUE",4)==0) || (strncasecmp(buffer,"YES",3)==0) || (strncasecmp(buffer,"ON",2)==0))
|
||||||
|| (strncasecmp(buffer,"YES",3)==0)
|
|
||||||
|| (strncasecmp(buffer,"ON",2)==0))
|
|
||||||
Pdh.flags |= PDQ_HOTKEYS;
|
Pdh.flags |= PDQ_HOTKEYS;
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
@ -1861,9 +1859,7 @@ void BlueWave_Fetch()
|
|||||||
buffer+=11;
|
buffer+=11;
|
||||||
while (isspace(buffer[0]) || buffer[0]=='=')
|
while (isspace(buffer[0]) || buffer[0]=='=')
|
||||||
buffer++;
|
buffer++;
|
||||||
if ((strncasecmp(buffer,"TRUE",4)==0)
|
if ((strncasecmp(buffer,"TRUE",4)==0) || (strncasecmp(buffer,"YES",3)==0) || (strncasecmp(buffer,"ON",2)==0))
|
||||||
|| (strncasecmp(buffer,"YES",3)==0)
|
|
||||||
|| (strncasecmp(buffer,"ON",2)==0))
|
|
||||||
Pdh.flags |= PDQ_XPERT;
|
Pdh.flags |= PDQ_XPERT;
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
@ -1871,9 +1867,7 @@ void BlueWave_Fetch()
|
|||||||
buffer+=12;
|
buffer+=12;
|
||||||
while (isspace(buffer[0]) || buffer[0]=='=')
|
while (isspace(buffer[0]) || buffer[0]=='=')
|
||||||
buffer++;
|
buffer++;
|
||||||
if ((strncasecmp(buffer,"TRUE",4)==0)
|
if ((strncasecmp(buffer,"TRUE",4)==0) || (strncasecmp(buffer,"YES",3)==0) || (strncasecmp(buffer,"ON",2)==0))
|
||||||
|| (strncasecmp(buffer,"YES",3)==0)
|
|
||||||
|| (strncasecmp(buffer,"ON",2)==0))
|
|
||||||
Pdh.flags |= PDQ_NOT_MY_MAIL;
|
Pdh.flags |= PDQ_NOT_MY_MAIL;
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
@ -1881,9 +1875,7 @@ void BlueWave_Fetch()
|
|||||||
buffer+=12;
|
buffer+=12;
|
||||||
while (isspace(buffer[0]) || buffer[0]=='=')
|
while (isspace(buffer[0]) || buffer[0]=='=')
|
||||||
buffer++;
|
buffer++;
|
||||||
if ((strncasecmp(buffer,"TRUE",4)==0)
|
if ((strncasecmp(buffer,"TRUE",4)==0) || (strncasecmp(buffer,"YES",3)==0) || (strncasecmp(buffer,"ON",2)==0))
|
||||||
|| (strncasecmp(buffer,"YES",3)==0)
|
|
||||||
|| (strncasecmp(buffer,"ON",2)==0))
|
|
||||||
Pdh.flags |= PDQ_GRAPHICS;
|
Pdh.flags |= PDQ_GRAPHICS;
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
@ -1937,8 +1929,7 @@ void BlueWave_Fetch()
|
|||||||
buffer+=4;
|
buffer+=4;
|
||||||
while (isspace(buffer[0]) || buffer[0]=='=')
|
while (isspace(buffer[0]) || buffer[0]=='=')
|
||||||
buffer++;
|
buffer++;
|
||||||
if ((strncasecmp(buffer,"All",3)==0)
|
if ((strncasecmp(buffer,"All",3)==0) || (strncasecmp(buffer,"Pers",4)==0)){
|
||||||
|| (strncasecmp(buffer,"Pers",4)==0)){
|
|
||||||
if ( HEAD_written == FALSE ){
|
if ( HEAD_written == FALSE ){
|
||||||
fwrite(&Pdh,sizeof(PDQ_HEADER),1,tp);
|
fwrite(&Pdh,sizeof(PDQ_HEADER),1,tp);
|
||||||
Syslog('m', "Writting PDQ header...");
|
Syslog('m', "Writting PDQ header...");
|
||||||
@ -1963,6 +1954,7 @@ void BlueWave_Fetch()
|
|||||||
temp = tl(temp);
|
temp = tl(temp);
|
||||||
unlink(temp);
|
unlink(temp);
|
||||||
}
|
}
|
||||||
|
|
||||||
sprintf(temp, "%s/%s/%s.PDQ", CFG.bbs_usersdir, exitinfo.Name, CFG.bbsid);
|
sprintf(temp, "%s/%s/%s.PDQ", CFG.bbs_usersdir, exitinfo.Name, CFG.bbsid);
|
||||||
if ((tp = fopen(temp, "r")) == NULL) {
|
if ((tp = fopen(temp, "r")) == NULL) {
|
||||||
temp = tl(temp);
|
temp = tl(temp);
|
||||||
|
Reference in New Issue
Block a user