TIC netmail forward now uses a template
This commit is contained in:
parent
4d543c8de6
commit
f5e883cc6f
@ -4696,6 +4696,7 @@ v0.33.20 10-Feb-2002
|
|||||||
the diesel macro language.
|
the diesel macro language.
|
||||||
The tic file forward function now uses only filenames in the
|
The tic file forward function now uses only filenames in the
|
||||||
subject of the netmail messages without the path.
|
subject of the netmail messages without the path.
|
||||||
|
The tic file forward netmails now uses template forward.tic
|
||||||
|
|
||||||
mball:
|
mball:
|
||||||
Will not crash anymore when it needs more then 10 minutes to
|
Will not crash anymore when it needs more then 10 minutes to
|
||||||
|
Binary file not shown.
@ -36,6 +36,8 @@
|
|||||||
#include "clcomm.h"
|
#include "clcomm.h"
|
||||||
#include "diesel.h"
|
#include "diesel.h"
|
||||||
|
|
||||||
|
static int firstrandom = TRUE;
|
||||||
|
|
||||||
|
|
||||||
void MacroVars( const char *codes, const char *fmt, ...)
|
void MacroVars( const char *codes, const char *fmt, ...)
|
||||||
{
|
{
|
||||||
@ -187,6 +189,53 @@ char *ParseMacro( const char *line, int *dieselrc)
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Add random fortune cookie to the macrovars
|
||||||
|
*/
|
||||||
|
void Cookie(void);
|
||||||
|
void Cookie(void)
|
||||||
|
{
|
||||||
|
FILE *olf;
|
||||||
|
char *fname;
|
||||||
|
long recno, records;
|
||||||
|
|
||||||
|
fname = calloc(PATH_MAX, sizeof(char));
|
||||||
|
sprintf(fname, "%s/etc/oneline.data", getenv("MBSE_ROOT"));
|
||||||
|
|
||||||
|
if ((olf = fopen(fname, "r")) == NULL) {
|
||||||
|
WriteError("$Can't open %s", fname);
|
||||||
|
free(fname);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
fread(&olhdr, sizeof(olhdr), 1, olf);
|
||||||
|
fseek(olf, 0, SEEK_END);
|
||||||
|
records = (ftell(olf) - olhdr.hdrsize) / olhdr.recsize;
|
||||||
|
|
||||||
|
if (firstrandom) {
|
||||||
|
srand(getpid());
|
||||||
|
firstrandom = FALSE;
|
||||||
|
}
|
||||||
|
recno = 1+(int) (1.0 * records * rand() / (RAND_MAX + 1.0));
|
||||||
|
Syslog('f', "Selected quote %d out of %d records", recno, records);
|
||||||
|
|
||||||
|
if (fseek(olf, olhdr.hdrsize + (recno * olhdr.recsize), SEEK_SET) == 0) {
|
||||||
|
if (fread(&ol, olhdr.recsize, 1, olf) == 1) {
|
||||||
|
MacroVars("F", "s", ol.Oneline);
|
||||||
|
} else {
|
||||||
|
WriteError("Can't read %s", fname);
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
WriteError("$Can't seek record %d in %s", recno, fname);
|
||||||
|
}
|
||||||
|
fclose(olf);
|
||||||
|
free(fname);
|
||||||
|
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
FILE *OpenMacro(const char *filename, int Language)
|
FILE *OpenMacro(const char *filename, int Language)
|
||||||
{
|
{
|
||||||
FILE *pLang, *fi = NULL;
|
FILE *pLang, *fi = NULL;
|
||||||
@ -236,6 +285,7 @@ FILE *OpenMacro(const char *filename, int Language)
|
|||||||
sprintf(temp, "%s-%s", OsName(), OsCPU());
|
sprintf(temp, "%s-%s", OsName(), OsCPU());
|
||||||
MacroVars("HLMNOSTUVYZ", "ssssssssssd", CFG.www_url, CFG.location, CFG.sysdomain, CFG.bbs_name, temp,
|
MacroVars("HLMNOSTUVYZ", "ssssssssssd", CFG.www_url, CFG.location, CFG.sysdomain, CFG.bbs_name, temp,
|
||||||
CFG.sysop_name, CFG.comment, CFG.sysop, VERSION, aka2str(CFG.aka[0]), 0);
|
CFG.sysop_name, CFG.comment, CFG.sysop, VERSION, aka2str(CFG.aka[0]), 0);
|
||||||
|
Cookie();
|
||||||
}
|
}
|
||||||
|
|
||||||
free(temp);
|
free(temp);
|
||||||
|
@ -7,7 +7,7 @@ include ../Makefile.global
|
|||||||
SRCS = addbbs.c backalias.c flock.c hatch.c mbdiff.c mgrutil.c pack.c \
|
SRCS = addbbs.c backalias.c flock.c hatch.c mbdiff.c mgrutil.c pack.c \
|
||||||
ptic.c sendmail.c tracker.c addpkt.c bwrite.c forward.c lhash.c \
|
ptic.c sendmail.c tracker.c addpkt.c bwrite.c forward.c lhash.c \
|
||||||
mbfido.c mkftnhdr.c ping.c rfc2ftn.c storeecho.c ulock.c aliasdb.c \
|
mbfido.c mkftnhdr.c ping.c rfc2ftn.c storeecho.c ulock.c aliasdb.c \
|
||||||
cookie.c fsort.c magic.c mbfile.c mover.c post.c rnews.c storenet.c \
|
fsort.c magic.c mbfile.c mover.c post.c rnews.c storenet.c \
|
||||||
utic.c announce.c fflist.c ftn2rfc.c makestat.c mbindex.c msgutil.c \
|
utic.c announce.c fflist.c ftn2rfc.c makestat.c mbindex.c msgutil.c \
|
||||||
postecho.c rollover.c tic.c areamgr.c filefind.c grlist.c maketags.c \
|
postecho.c rollover.c tic.c areamgr.c filefind.c grlist.c maketags.c \
|
||||||
mbmsg.c newspost.c postemail.c scan.c toberep.c atoul.c filemgr.c \
|
mbmsg.c newspost.c postemail.c scan.c toberep.c atoul.c filemgr.c \
|
||||||
@ -18,7 +18,7 @@ SRCS = addbbs.c backalias.c flock.c hatch.c mbdiff.c mgrutil.c pack.c \
|
|||||||
HDRS = addbbs.h backalias.h flock.h hatch.h mbdiff.h mgrutil.h pack.h \
|
HDRS = addbbs.h backalias.h flock.h hatch.h mbdiff.h mgrutil.h pack.h \
|
||||||
postnetmail.h scannews.h tosspkt.h addpkt.h bwrite.h forward.h \
|
postnetmail.h scannews.h tosspkt.h addpkt.h bwrite.h forward.h \
|
||||||
lhash.h mbfido.h mkftnhdr.h paths.h ptic.h sendmail.h tracker.h \
|
lhash.h mbfido.h mkftnhdr.h paths.h ptic.h sendmail.h tracker.h \
|
||||||
aliasdb.h cookie.h fsort.h magic.h mbfile.h mover.h ping.h rfc2ftn.h \
|
aliasdb.h fsort.h magic.h mbfile.h mover.h ping.h rfc2ftn.h \
|
||||||
storeecho.h ulock.h announce.h fflist.h ftn2rfc.h makestat.h mbindex.h \
|
storeecho.h ulock.h announce.h fflist.h ftn2rfc.h makestat.h mbindex.h \
|
||||||
msgutil.h post.h rnews.h storenet.h utic.h areamgr.h filefind.h \
|
msgutil.h post.h rnews.h storenet.h utic.h areamgr.h filefind.h \
|
||||||
grlist.h maketags.h mbmsg.h newspost.h postecho.h rollover.h tic.h \
|
grlist.h maketags.h mbmsg.h newspost.h postecho.h rollover.h tic.h \
|
||||||
@ -29,7 +29,7 @@ HDRS = addbbs.h backalias.h flock.h hatch.h mbdiff.h mgrutil.h pack.h \
|
|||||||
MBFIDO_OBJS = flock.o tosspkt.o mbfido.o hatch.o maketags.o virscan.o tracker.o \
|
MBFIDO_OBJS = flock.o tosspkt.o mbfido.o hatch.o maketags.o virscan.o tracker.o \
|
||||||
makestat.o scannews.o lhash.o bounce.o pack.o ulock.o tic.o ptic.o \
|
makestat.o scannews.o lhash.o bounce.o pack.o ulock.o tic.o ptic.o \
|
||||||
utic.o mover.o hash.o mkftnhdr.o addbbs.o magic.o fsort.o toberep.o \
|
utic.o mover.o hash.o mkftnhdr.o addbbs.o magic.o fsort.o toberep.o \
|
||||||
ftn2rfc.o atoul.o ping.o cookie.o forward.o sendmail.o scan.o addpkt.o \
|
ftn2rfc.o atoul.o ping.o forward.o sendmail.o scan.o addpkt.o \
|
||||||
storenet.o storeecho.o areamgr.o filemgr.o notify.o mgrutil.o rollover.o \
|
storenet.o storeecho.o areamgr.o filemgr.o notify.o mgrutil.o rollover.o \
|
||||||
bwrite.o rfc2ftn.o rnews.o newspost.o aliasdb.o postemail.o postnetmail.o \
|
bwrite.o rfc2ftn.o rnews.o newspost.o aliasdb.o postemail.o postnetmail.o \
|
||||||
postecho.o backalias.o createm.o createf.o
|
postecho.o backalias.o createm.o createf.o
|
||||||
@ -146,7 +146,7 @@ sendmail.o: ../lib/libs.h ../lib/structs.h ../lib/users.h ../lib/records.h ../li
|
|||||||
tracker.o: ../lib/libs.h ../lib/structs.h ../lib/users.h ../lib/records.h ../lib/common.h ../lib/clcomm.h ../lib/dbnode.h ../lib/dbftn.h tracker.h
|
tracker.o: ../lib/libs.h ../lib/structs.h ../lib/users.h ../lib/records.h ../lib/common.h ../lib/clcomm.h ../lib/dbnode.h ../lib/dbftn.h tracker.h
|
||||||
addpkt.o: ../lib/libs.h ../lib/structs.h ../lib/users.h ../lib/records.h ../lib/clcomm.h ../lib/common.h ../lib/dbnode.h ../lib/dbmsgs.h pack.h addpkt.h
|
addpkt.o: ../lib/libs.h ../lib/structs.h ../lib/users.h ../lib/records.h ../lib/clcomm.h ../lib/common.h ../lib/dbnode.h ../lib/dbmsgs.h pack.h addpkt.h
|
||||||
bwrite.o: ../lib/libs.h bwrite.h
|
bwrite.o: ../lib/libs.h bwrite.h
|
||||||
forward.o: ../lib/libs.h ../lib/structs.h ../lib/users.h ../lib/records.h ../lib/common.h ../lib/clcomm.h ../lib/dbnode.h ../lib/dbtic.h tic.h cookie.h sendmail.h rollover.h forward.h
|
forward.o: ../lib/libs.h ../lib/structs.h ../lib/users.h ../lib/records.h ../lib/common.h ../lib/clcomm.h ../lib/dbnode.h ../lib/dbtic.h ../lib/diesel.h tic.h sendmail.h rollover.h mgrutil.h forward.h
|
||||||
lhash.o: ../lib/libs.h ../lib/clcomm.h lhash.h
|
lhash.o: ../lib/libs.h ../lib/clcomm.h lhash.h
|
||||||
mbfido.o: ../lib/libs.h ../lib/mbse.h ../lib/structs.h ../lib/users.h ../lib/records.h ../lib/common.h ../lib/clcomm.h ../lib/dbdupe.h ../lib/dbcfg.h ../lib/dbnode.h ../lib/dbmsgs.h ../lib/dbuser.h ../lib/dbftn.h ../lib/dbtic.h ../lib/msg.h flock.h tosspkt.h pack.h ulock.h tic.h fsort.h scan.h mbfido.h tracker.h notify.h rollover.h hatch.h scannews.h maketags.h makestat.h newspost.h rnews.h backalias.h rfc2ftn.h
|
mbfido.o: ../lib/libs.h ../lib/mbse.h ../lib/structs.h ../lib/users.h ../lib/records.h ../lib/common.h ../lib/clcomm.h ../lib/dbdupe.h ../lib/dbcfg.h ../lib/dbnode.h ../lib/dbmsgs.h ../lib/dbuser.h ../lib/dbftn.h ../lib/dbtic.h ../lib/msg.h flock.h tosspkt.h pack.h ulock.h tic.h fsort.h scan.h mbfido.h tracker.h notify.h rollover.h hatch.h scannews.h maketags.h makestat.h newspost.h rnews.h backalias.h rfc2ftn.h
|
||||||
mkftnhdr.o: ../lib/libs.h ../lib/structs.h ../lib/users.h ../lib/records.h ../lib/common.h ../lib/clcomm.h ../lib/dbcfg.h atoul.h hash.h aliasdb.h mkftnhdr.h
|
mkftnhdr.o: ../lib/libs.h ../lib/structs.h ../lib/users.h ../lib/records.h ../lib/common.h ../lib/clcomm.h ../lib/dbcfg.h atoul.h hash.h aliasdb.h mkftnhdr.h
|
||||||
@ -155,7 +155,6 @@ rfc2ftn.o: ../lib/libs.h ../lib/structs.h ../lib/users.h ../lib/records.h ../lib
|
|||||||
storeecho.o: ../lib/libs.h ../lib/structs.h ../lib/users.h ../lib/records.h ../lib/common.h ../lib/clcomm.h ../lib/msg.h ../lib/msgtext.h ../lib/dbmsgs.h ../lib/dbuser.h rollover.h storeecho.h
|
storeecho.o: ../lib/libs.h ../lib/structs.h ../lib/users.h ../lib/records.h ../lib/common.h ../lib/clcomm.h ../lib/msg.h ../lib/msgtext.h ../lib/dbmsgs.h ../lib/dbuser.h rollover.h storeecho.h
|
||||||
ulock.o: ../lib/libs.h ../lib/structs.h ../lib/users.h ../lib/records.h ../lib/common.h ../lib/clcomm.h flock.h ulock.h
|
ulock.o: ../lib/libs.h ../lib/structs.h ../lib/users.h ../lib/records.h ../lib/common.h ../lib/clcomm.h flock.h ulock.h
|
||||||
aliasdb.o: ../lib/libs.h ../lib/structs.h ../lib/users.h ../lib/records.h ../lib/common.h ../lib/clcomm.h aliasdb.h
|
aliasdb.o: ../lib/libs.h ../lib/structs.h ../lib/users.h ../lib/records.h ../lib/common.h ../lib/clcomm.h aliasdb.h
|
||||||
cookie.o: ../lib/libs.h ../lib/structs.h ../lib/users.h ../lib/records.h ../lib/common.h ../lib/clcomm.h cookie.h
|
|
||||||
fsort.o: ../lib/libs.h ../lib/clcomm.h fsort.h
|
fsort.o: ../lib/libs.h ../lib/clcomm.h fsort.h
|
||||||
magic.o: ../lib/libs.h ../lib/structs.h ../lib/users.h ../lib/records.h ../lib/common.h ../lib/clcomm.h ../lib/dbtic.h tic.h utic.h magic.h
|
magic.o: ../lib/libs.h ../lib/structs.h ../lib/users.h ../lib/records.h ../lib/common.h ../lib/clcomm.h ../lib/dbtic.h tic.h utic.h magic.h
|
||||||
mbfile.o: ../lib/libs.h ../lib/structs.h ../lib/users.h ../lib/records.h ../lib/common.h ../lib/clcomm.h ../lib/dbcfg.h mbfkill.h mbfadopt.h mbfindex.h mbfcheck.h mbfpack.h mbflist.h mbfimport.h mbftoberep.h mbfmove.h mbfdel.h mbfutil.h mbfile.h
|
mbfile.o: ../lib/libs.h ../lib/structs.h ../lib/users.h ../lib/records.h ../lib/common.h ../lib/clcomm.h ../lib/dbcfg.h mbfkill.h mbfadopt.h mbfindex.h mbfcheck.h mbfpack.h mbflist.h mbfimport.h mbftoberep.h mbfmove.h mbfdel.h mbfutil.h mbfile.h
|
||||||
@ -174,7 +173,7 @@ postecho.o: ../lib/libs.h ../lib/structs.h ../lib/users.h ../lib/records.h ../li
|
|||||||
rollover.o: ../lib/libs.h ../lib/structs.h ../lib/users.h ../lib/records.h ../lib/common.h ../lib/clcomm.h rollover.h
|
rollover.o: ../lib/libs.h ../lib/structs.h ../lib/users.h ../lib/records.h ../lib/common.h ../lib/clcomm.h rollover.h
|
||||||
tic.o: ../lib/libs.h ../lib/structs.h ../lib/users.h ../lib/records.h ../lib/common.h ../lib/dbftn.h ../lib/clcomm.h ulock.h ptic.h fsort.h pack.h tic.h
|
tic.o: ../lib/libs.h ../lib/structs.h ../lib/users.h ../lib/records.h ../lib/common.h ../lib/dbftn.h ../lib/clcomm.h ulock.h ptic.h fsort.h pack.h tic.h
|
||||||
areamgr.o: ../lib/libs.h ../lib/structs.h ../lib/users.h ../lib/records.h ../lib/common.h ../lib/clcomm.h ../lib/msg.h ../lib/msgtext.h ../lib/dbcfg.h ../lib/dbnode.h ../lib/dbmsgs.h ../lib/dbdupe.h ../lib/dbuser.h ../lib/dbftn.h ../lib/diesel.h sendmail.h mgrutil.h scan.h createm.h areamgr.h
|
areamgr.o: ../lib/libs.h ../lib/structs.h ../lib/users.h ../lib/records.h ../lib/common.h ../lib/clcomm.h ../lib/msg.h ../lib/msgtext.h ../lib/dbcfg.h ../lib/dbnode.h ../lib/dbmsgs.h ../lib/dbdupe.h ../lib/dbuser.h ../lib/dbftn.h ../lib/diesel.h sendmail.h mgrutil.h scan.h createm.h areamgr.h
|
||||||
filefind.o: ../lib/libs.h ../lib/structs.h ../lib/users.h ../lib/records.h ../lib/common.h ../lib/clcomm.h ../lib/dbcfg.h ../lib/msg.h ../lib/msgtext.h fflist.h filefind.h msgutil.h
|
filefind.o: ../lib/libs.h ../lib/structs.h ../lib/users.h ../lib/records.h ../lib/common.h ../lib/clcomm.h ../lib/dbcfg.h ../lib/msg.h ../lib/msgtext.h ../lib/diesel.h fflist.h filefind.h msgutil.h
|
||||||
grlist.o: ../lib/libs.h ../lib/clcomm.h grlist.h
|
grlist.o: ../lib/libs.h ../lib/clcomm.h grlist.h
|
||||||
maketags.o: ../lib/libs.h ../lib/structs.h ../lib/users.h ../lib/records.h ../lib/common.h ../lib/clcomm.h maketags.h
|
maketags.o: ../lib/libs.h ../lib/structs.h ../lib/users.h ../lib/records.h ../lib/common.h ../lib/clcomm.h maketags.h
|
||||||
mbmsg.o: ../lib/libs.h ../lib/structs.h ../lib/users.h ../lib/records.h ../lib/common.h ../lib/clcomm.h ../lib/msg.h ../lib/dbcfg.h post.h mbmsg.h
|
mbmsg.o: ../lib/libs.h ../lib/structs.h ../lib/users.h ../lib/records.h ../lib/common.h ../lib/clcomm.h ../lib/msg.h ../lib/dbcfg.h post.h mbmsg.h
|
||||||
|
@ -464,12 +464,13 @@ void A_Status(faddr *t, char *replyid)
|
|||||||
|
|
||||||
subject = calloc(255, sizeof(char));
|
subject = calloc(255, sizeof(char));
|
||||||
sprintf(subject,"AreaMgr Status");
|
sprintf(subject,"AreaMgr Status");
|
||||||
|
Syslog('+', "AreaMgr: Status");
|
||||||
|
|
||||||
if (Miy == 0)
|
if (Miy == 0)
|
||||||
i = 11;
|
i = 11;
|
||||||
else
|
else
|
||||||
i = Miy - 1;
|
i = Miy - 1;
|
||||||
MacroVars("DCEFGRPQRpqrsYy","ddddcsddddddsss",
|
MacroVars("DCEfGvPQRpqrsYy","ddddcsddddddsss",
|
||||||
nodes.Direct,
|
nodes.Direct,
|
||||||
nodes.Crash,
|
nodes.Crash,
|
||||||
nodes.Hold,
|
nodes.Hold,
|
||||||
@ -487,7 +488,6 @@ void A_Status(faddr *t, char *replyid)
|
|||||||
ascfnode(bestaka_s(t), 0xf)
|
ascfnode(bestaka_s(t), 0xf)
|
||||||
);
|
);
|
||||||
GetRpSubject("areamgr.status",subject);
|
GetRpSubject("areamgr.status",subject);
|
||||||
Syslog('+', "AreaMgr: Status");
|
|
||||||
|
|
||||||
if ((fi = OpenMacro("areamgr.status", nodes.Language)) == NULL ){
|
if ((fi = OpenMacro("areamgr.status", nodes.Language)) == NULL ){
|
||||||
MacroClear();
|
MacroClear();
|
||||||
|
@ -292,7 +292,7 @@ void F_Status(faddr *t, char *replyid)
|
|||||||
i = 11;
|
i = 11;
|
||||||
else
|
else
|
||||||
i = Miy - 1;
|
i = Miy - 1;
|
||||||
MacroVars("ABCDEFGIJabcdefghijkls", "ddddddddddddddddddddds",
|
MacroVars("ABCDEfGIJabcdefghijkls", "ddddddddddddddddddddds",
|
||||||
nodes.Message,
|
nodes.Message,
|
||||||
nodes.Tic,
|
nodes.Tic,
|
||||||
nodes.AdvTic,
|
nodes.AdvTic,
|
||||||
|
@ -36,10 +36,11 @@
|
|||||||
#include "../lib/clcomm.h"
|
#include "../lib/clcomm.h"
|
||||||
#include "../lib/dbnode.h"
|
#include "../lib/dbnode.h"
|
||||||
#include "../lib/dbtic.h"
|
#include "../lib/dbtic.h"
|
||||||
|
#include "../lib/diesel.h"
|
||||||
#include "tic.h"
|
#include "tic.h"
|
||||||
#include "cookie.h"
|
|
||||||
#include "sendmail.h"
|
#include "sendmail.h"
|
||||||
#include "rollover.h"
|
#include "rollover.h"
|
||||||
|
#include "mgrutil.h"
|
||||||
#include "forward.h"
|
#include "forward.h"
|
||||||
|
|
||||||
|
|
||||||
@ -47,13 +48,14 @@
|
|||||||
|
|
||||||
void ForwardFile(fidoaddr Node, fa_list *sbl)
|
void ForwardFile(fidoaddr Node, fa_list *sbl)
|
||||||
{
|
{
|
||||||
char *subject = NULL, *temp, *fwdfile = NULL, *ticfile = NULL, fname[PATH_MAX], *ticname;
|
char *subject = NULL, *temp, *line, *fwdfile = NULL, *ticfile = NULL, fname[PATH_MAX], *ticname;
|
||||||
FILE *fp, *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));
|
||||||
|
|
||||||
@ -133,32 +135,38 @@ void ForwardFile(fidoaddr Node, fa_list *sbl)
|
|||||||
* Send netmail message if the node has it turned on.
|
* Send netmail message if the node has it turned on.
|
||||||
*/
|
*/
|
||||||
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) {
|
||||||
fprintf(net, " Dear %s\r", nodes.Sysop);
|
if ((fi = OpenMacro("forward.tic", nodes.Language)) != NULL) {
|
||||||
fprintf(net, "\r");
|
MacroVars("abcfghijmns", "ssdsddsssss", TIC.TicIn.Area, TIC.TicIn.AreaDesc, TIC.FileCost,
|
||||||
fprintf(net, "I sent the following file to your system:\r");
|
TIC.TicIn.FullName, TIC.FileSize, TIC.FileSize / 1024,
|
||||||
fprintf(net, "\r");
|
TIC.TicIn.Crc, TIC.TicIn.Origin, " ", TIC.TicIn.LDesc[0], nodes.Sysop);
|
||||||
if (TIC.SendOrg)
|
if (TIC.SendOrg)
|
||||||
fprintf(net, "File : %s\r", TIC.RealName);
|
MacroVars("e", "s", TIC.RealName);
|
||||||
else
|
else
|
||||||
fprintf(net, "File : %s\r", TIC.NewName);
|
MacroVars("e", "s", TIC.NewName);
|
||||||
fprintf(net, "Description : %s\r", TIC.TicIn.Desc);
|
if (strlen(TIC.TicIn.Magic))
|
||||||
fprintf(net, "Area : %s %s\r", TIC.TicIn.Area, TIC.TicIn.AreaDesc);
|
MacroVars("k", "s", TIC.TicIn.Magic);
|
||||||
fprintf(net, "Size : %ld\r", (long)(TIC.FileSize));
|
if (strlen(TIC.TicIn.Replace))
|
||||||
fprintf(net, "CRC : %s\r", TIC.TicIn.Crc);
|
MacroVars("l", "s", TIC.TicIn.Replace);
|
||||||
fprintf(net, "Origin : %s\r", TIC.TicIn.Origin);
|
MacroRead(fi, net);
|
||||||
if (strlen(TIC.TicIn.Magic))
|
filepos = ftell(fi);
|
||||||
fprintf(net, "Magic : %s\r", TIC.TicIn.Magic);
|
for (i = 1; i < 25; i++) {
|
||||||
if (strlen(TIC.TicIn.Replace))
|
fseek(fi, filepos, SEEK_SET);
|
||||||
fprintf(net, "Replaces : %s\r", TIC.TicIn.Replace);
|
if (strlen(TIC.TicIn.LDesc[i])) {
|
||||||
fprintf(net, "\r\r");
|
MacroRead(fi, net);
|
||||||
fprintf(net, "With regards, %s\r\r", CFG.sysop_name);
|
} else {
|
||||||
fprintf(net, "... %s\r\r", Cookie());
|
line = calloc(255, sizeof(char));
|
||||||
fprintf(net, "%s\r", TearLine());
|
while ((fgets(line, 254, fi) != NULL) && ((line[0]!='@') || (line[1]!='|'))) {}
|
||||||
CloseMail(net, fido2faddr(Node));
|
free(line);
|
||||||
} else {
|
}
|
||||||
WriteError("$Can't create netmail");
|
}
|
||||||
|
MacroRead(fi, net);
|
||||||
|
fprintf(net, "%s\r", TearLine());
|
||||||
|
CloseMail(net, fido2faddr(Node));
|
||||||
}
|
}
|
||||||
|
} else {
|
||||||
|
WriteError("$Can't create netmail");
|
||||||
|
}
|
||||||
}
|
}
|
||||||
free(subject);
|
free(subject);
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user