Fixed forward message

This commit is contained in:
Michiel Broek 2002-04-04 18:46:34 +00:00
parent 5cc28c0e8a
commit 2c0813c3b9
2 changed files with 3 additions and 16 deletions

Binary file not shown.

View File

@ -48,14 +48,13 @@
void ForwardFile(fidoaddr Node, fa_list *sbl) void ForwardFile(fidoaddr Node, fa_list *sbl)
{ {
char *subject = NULL, *temp, *line, *fwdfile = NULL, *ticfile = NULL, fname[PATH_MAX], *ticname; char *subject = NULL, *temp, *fwdfile = NULL, *ticfile = NULL, fname[PATH_MAX], *ticname;
FILE *fp, *fi, *net; FILE *fp, *fi, *net;
char flavor; char flavor;
faddr *dest, *route, *Fa; faddr *dest, *route, *Fa;
int i, z, n; int i, z, n;
time_t now; time_t now;
fa_list *tmp; fa_list *tmp;
long filepos;
Syslog('+', "Forward file to %s", aka2str(Node)); Syslog('+', "Forward file to %s", aka2str(Node));
@ -137,9 +136,9 @@ void ForwardFile(fidoaddr Node, fa_list *sbl)
if (nodes.Message) { if (nodes.Message) {
if ((net = SendMgrMail(fido2faddr(Node), CFG.ct_KeepMgr, TRUE, (char *)"Filemgr", subject, NULL)) != NULL) { if ((net = SendMgrMail(fido2faddr(Node), CFG.ct_KeepMgr, TRUE, (char *)"Filemgr", subject, NULL)) != NULL) {
if ((fi = OpenMacro("forward.tic", nodes.Language)) != NULL) { if ((fi = OpenMacro("forward.tic", nodes.Language)) != NULL) {
MacroVars("abcfghijmns", "ssdsddsssss", TIC.TicIn.Area, TIC.TicIn.AreaDesc, TIC.FileCost, MacroVars("abcdfghijmns", "ssdssddsssss", TIC.TicIn.Area, tic.Comment, TIC.FileCost, fgroup.Comment,
TIC.TicIn.FullName, TIC.FileSize, TIC.FileSize / 1024, TIC.TicIn.FullName, TIC.FileSize, TIC.FileSize / 1024,
TIC.TicIn.Crc, TIC.TicIn.Origin, " ", TIC.TicIn.LDesc[0], nodes.Sysop); TIC.TicIn.Crc, TIC.TicIn.Origin, " ", TIC.TicIn.Desc, nodes.Sysop);
if (TIC.SendOrg) if (TIC.SendOrg)
MacroVars("e", "s", TIC.RealName); MacroVars("e", "s", TIC.RealName);
else else
@ -149,18 +148,6 @@ void ForwardFile(fidoaddr Node, fa_list *sbl)
if (strlen(TIC.TicIn.Replace)) if (strlen(TIC.TicIn.Replace))
MacroVars("l", "s", TIC.TicIn.Replace); MacroVars("l", "s", TIC.TicIn.Replace);
MacroRead(fi, net); MacroRead(fi, net);
filepos = ftell(fi);
for (i = 1; i < 25; i++) {
fseek(fi, filepos, SEEK_SET);
if (strlen(TIC.TicIn.LDesc[i])) {
MacroRead(fi, net);
} else {
line = calloc(255, sizeof(char));
while ((fgets(line, 254, fi) != NULL) && ((line[0]!='@') || (line[1]!='|'))) {}
free(line);
}
}
MacroRead(fi, net);
fprintf(net, "%s\r", TearLine()); fprintf(net, "%s\r", TearLine());
CloseMail(net, fido2faddr(Node)); CloseMail(net, fido2faddr(Node));
} }