AreaMgr and FileMgr messages don't have hardcoded fallback anymore
This commit is contained in:
parent
1c92032427
commit
742d84c9d4
@ -4693,7 +4693,7 @@ v0.33.20 10-Feb-2002
|
|||||||
newsgroup didn't exist.
|
newsgroup didn't exist.
|
||||||
For points in echomail no seen-by entry is added.
|
For points in echomail no seen-by entry is added.
|
||||||
The AreaMgr and FileMgr responses and notify messages now use
|
The AreaMgr and FileMgr responses and notify messages now use
|
||||||
the diesel macro language with fallback to hardcoded replies.
|
the diesel macro language.
|
||||||
|
|
||||||
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
|
||||||
|
@ -37,7 +37,7 @@ export CVSROOT=username@cvs.mbse.sourceforge.net:/cvsroot/mbse
|
|||||||
|
|
||||||
Install the sources with the followin command:
|
Install the sources with the followin command:
|
||||||
|
|
||||||
cvs co mbsebbs
|
cvs -dusername@cvs.mbse.sourceforge.net:/cvsroot/mbse co mbsebbs
|
||||||
|
|
||||||
That will create the directory mbsebbs with all subdirectories. When you made
|
That will create the directory mbsebbs with all subdirectories. When you made
|
||||||
some changes you can commit these from within the directory mbsebbs with:
|
some changes you can commit these from within the directory mbsebbs with:
|
||||||
|
@ -230,7 +230,7 @@ FILE *OpenMacro(const char *filename, int Language)
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (fi == NULL)
|
if (fi == NULL)
|
||||||
Syslog('d', "OpenMacro(%s, %c): not found, using hardcoded", filename, Language);
|
WriteError("OpenMacro(%s, %c): not found", filename, Language);
|
||||||
else {
|
else {
|
||||||
Syslog('d', "OpenMacro(%s, %c): using %s", filename, Language, temp);
|
Syslog('d', "OpenMacro(%s, %c): using %s", filename, Language, temp);
|
||||||
MacroVars("HLMNSTUYZ", "ssssssssd", CFG.www_url, CFG.location, CFG.sysdomain, CFG.bbs_name,
|
MacroVars("HLMNSTUYZ", "ssssssssd", CFG.www_url, CFG.location, CFG.sysdomain, CFG.bbs_name,
|
||||||
|
@ -150,7 +150,7 @@ forward.o: ../lib/libs.h ../lib/structs.h ../lib/users.h ../lib/records.h ../lib
|
|||||||
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
|
||||||
ping.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/dbtic.h ../lib/dbdupe.h ../lib/dbuser.h ../lib/dbftn.h sendmail.h mgrutil.h postnetmail.h ping.h
|
ping.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/dbtic.h ../lib/dbdupe.h ../lib/dbuser.h ../lib/dbftn.h sendmail.h postnetmail.h ping.h
|
||||||
rfc2ftn.o: ../lib/libs.h ../lib/structs.h ../lib/users.h ../lib/records.h ../lib/common.h ../lib/clcomm.h ../lib/mbinet.h ../lib/dbdupe.h ../lib/dbnode.h ../lib/dbmsgs.h ../lib/msg.h ../lib/msgtext.h mkftnhdr.h hash.h rollover.h pack.h postnetmail.h postecho.h rfc2ftn.h
|
rfc2ftn.o: ../lib/libs.h ../lib/structs.h ../lib/users.h ../lib/records.h ../lib/common.h ../lib/clcomm.h ../lib/mbinet.h ../lib/dbdupe.h ../lib/dbnode.h ../lib/dbmsgs.h ../lib/msg.h ../lib/msgtext.h mkftnhdr.h hash.h rollover.h pack.h postnetmail.h postecho.h rfc2ftn.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
|
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
|
||||||
@ -203,7 +203,7 @@ virscan.o: ../lib/libs.h ../lib/structs.h ../lib/users.h ../lib/records.h ../lib
|
|||||||
mbftoberep.o: ../lib/libs.h ../lib/structs.h ../lib/users.h ../lib/records.h ../lib/common.h ../lib/clcomm.h ../lib/dbcfg.h mbfutil.h mbftoberep.h
|
mbftoberep.o: ../lib/libs.h ../lib/structs.h ../lib/users.h ../lib/records.h ../lib/common.h ../lib/clcomm.h ../lib/dbcfg.h mbfutil.h mbftoberep.h
|
||||||
mbfmove.o: ../lib/libs.h ../lib/structs.h ../lib/users.h ../lib/records.h ../lib/common.h ../lib/clcomm.h ../lib/dbcfg.h mbfutil.h mbfmove.h
|
mbfmove.o: ../lib/libs.h ../lib/structs.h ../lib/users.h ../lib/records.h ../lib/common.h ../lib/clcomm.h ../lib/dbcfg.h mbfutil.h mbfmove.h
|
||||||
mbfdel.o: ../lib/libs.h ../lib/structs.h ../lib/users.h ../lib/records.h ../lib/common.h ../lib/clcomm.h ../lib/dbcfg.h mbfutil.h mbfmove.h
|
mbfdel.o: ../lib/libs.h ../lib/structs.h ../lib/users.h ../lib/records.h ../lib/common.h ../lib/clcomm.h ../lib/dbcfg.h mbfutil.h mbfmove.h
|
||||||
bounce.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/dbtic.h ../lib/dbdupe.h ../lib/dbuser.h ../lib/dbftn.h sendmail.h mgrutil.h postnetmail.h ping.h
|
bounce.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/dbtic.h ../lib/dbdupe.h ../lib/dbuser.h ../lib/dbftn.h sendmail.h postnetmail.h ping.h
|
||||||
createm.o: ../lib/libs.h ../lib/structs.h ../lib/users.h ../lib/records.h ../lib/common.h ../lib/clcomm.h mgrutil.h createm.h
|
createm.o: ../lib/libs.h ../lib/structs.h ../lib/users.h ../lib/records.h ../lib/common.h ../lib/clcomm.h mgrutil.h createm.h
|
||||||
createf.o: ../lib/libs.h ../lib/structs.h ../lib/users.h ../lib/records.h ../lib/common.h ../lib/clcomm.h createm.h
|
createf.o: ../lib/libs.h ../lib/structs.h ../lib/users.h ../lib/records.h ../lib/common.h ../lib/clcomm.h createm.h
|
||||||
# End of generated dependencies
|
# End of generated dependencies
|
||||||
|
308
mbfido/areamgr.c
308
mbfido/areamgr.c
@ -95,51 +95,15 @@ void A_Help(faddr *t, char *replyid)
|
|||||||
if ((fi = OpenMacro("areamgr.help", nodes.Language)) != NULL ){
|
if ((fi = OpenMacro("areamgr.help", nodes.Language)) != NULL ){
|
||||||
MacroVars("sAYP", "ssss", nodes.Sysop, "Areamgr", ascfnode(bestaka_s(t), 0xf), nodes.Apasswd );
|
MacroVars("sAYP", "ssss", nodes.Sysop, "Areamgr", ascfnode(bestaka_s(t), 0xf), nodes.Apasswd );
|
||||||
MacroRead(fi, fp);
|
MacroRead(fi, fp);
|
||||||
MacroClear();
|
|
||||||
fclose(fi);
|
fclose(fi);
|
||||||
}else{
|
|
||||||
fprintf(fp, "Address all requests to '%s' (without quotes)\r", (char *)"Areamgr");
|
|
||||||
fprintf(fp, "Your AreaMgr password goes on the subject line.\r\r");
|
|
||||||
|
|
||||||
fprintf(fp, "In the body of the message to AreaMgr:\r\r");
|
|
||||||
|
|
||||||
fprintf(fp, "+<areaname> To connect to an echomail area\r");
|
|
||||||
fprintf(fp, "-<areaname> To disconnect from an echomail area\r");
|
|
||||||
fprintf(fp, "%%+ALL To connect to all echomail areas\r");
|
|
||||||
fprintf(fp, "%%-ALL To disconnect from all echomail areas\r");
|
|
||||||
fprintf(fp, "%%+<group> To connect all echomail areas of a group\r");
|
|
||||||
fprintf(fp, "%%-<group> To disconnect from all echomail areas of a group\r");
|
|
||||||
fprintf(fp, "%%HELP To request this help message\r");
|
|
||||||
fprintf(fp, "%%LIST To request a list of echomail areas available to you\r");
|
|
||||||
fprintf(fp, "%%QUERY To request a list of echomail areas for which you are active\r");
|
|
||||||
fprintf(fp, "%%UNLINKED To request a list of echomail areas available to you\r");
|
|
||||||
fprintf(fp, " to which you are not already connected\r");
|
|
||||||
fprintf(fp, "%%FLOW To request a flow report of available areas\r");
|
|
||||||
fprintf(fp, "%%STATUS To request a status report for your system\r");
|
|
||||||
fprintf(fp, "%%PAUSE To temporary disconnect from the connected echomail areas\r");
|
|
||||||
fprintf(fp, "%%RESUME To reconnect the temporary disconnected echomail areas\r");
|
|
||||||
fprintf(fp, "%%PWD=newpwd To set a new AreaMgr and FileMgr password\r");
|
|
||||||
fprintf(fp, "%%MSGS <n> To set max. number of messages to be rescanned\r");
|
|
||||||
fprintf(fp, "%%RESCAN <area> To request messages from 'area' again\r");
|
|
||||||
fprintf(fp, "%%NOTIFY=On/Off To switch the notify function on or off\r");
|
|
||||||
fprintf(fp, "[---] Everything below the tearline is ignored\r\r");
|
|
||||||
|
|
||||||
fprintf(fp, "Example:\r\r");
|
|
||||||
|
|
||||||
fprintf(fp, " By: %s\r", nodes.Sysop);
|
|
||||||
fprintf(fp, " To: %s, %s\r", (char *)"Areamgr", ascfnode(bestaka_s(t), 0xf));
|
|
||||||
fprintf(fp, " Re: %s\r", nodes.Apasswd);
|
|
||||||
fprintf(fp, " St: Pvt Local Kill\r");
|
|
||||||
fprintf(fp, " ----------------------------------------------------------\r");
|
|
||||||
fprintf(fp, " +SYSOPS\r");
|
|
||||||
fprintf(fp, " -GENERAL\r");
|
|
||||||
fprintf(fp, " %%QUERY\r");
|
|
||||||
fprintf(fp, " %%LIST\r\r");
|
|
||||||
}
|
}
|
||||||
|
|
||||||
fprintf(fp, "%s\r", TearLine());
|
fprintf(fp, "%s\r", TearLine());
|
||||||
CloseMail(fp, t);
|
CloseMail(fp, t);
|
||||||
} else
|
} else {
|
||||||
WriteError("Can't create netmail");
|
WriteError("Can't create netmail");
|
||||||
|
}
|
||||||
|
|
||||||
free(subject);
|
free(subject);
|
||||||
MacroClear();
|
MacroClear();
|
||||||
}
|
}
|
||||||
@ -152,6 +116,8 @@ void A_Query(faddr *t, char *replyid)
|
|||||||
A_List(t, replyid, LIST_QUERY);
|
A_List(t, replyid, LIST_QUERY);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
void A_List(faddr *t, char *replyid, int Notify)
|
void A_List(faddr *t, char *replyid, int Notify)
|
||||||
{
|
{
|
||||||
FILE *qp, *gp, *mp, *fi = NULL;
|
FILE *qp, *gp, *mp, *fi = NULL;
|
||||||
@ -167,27 +133,34 @@ void A_List(faddr *t, char *replyid, int Notify)
|
|||||||
f = bestaka_s(t);
|
f = bestaka_s(t);
|
||||||
MacroVars("sKyY", "sdss", nodes.Sysop, Notify, ascfnode(t, 0xff), ascfnode(f, 0xf));
|
MacroVars("sKyY", "sdss", nodes.Sysop, Notify, ascfnode(t, 0xff), ascfnode(f, 0xf));
|
||||||
|
|
||||||
if (Notify==LIST_NOTIFY){
|
switch (Notify) {
|
||||||
Syslog('+', "AreaMgr: Notify to %s", ascfnode(t, 0xff));
|
case LIST_NOTIFY: Syslog('+', "AreaMgr: Notify to %s", ascfnode(t, 0xff));
|
||||||
sprintf(subject,"AreaMgr Notify");
|
sprintf(subject,"AreaMgr Notify");
|
||||||
GetRpSubject("areamgr.notify.list",subject);
|
GetRpSubject("areamgr.notify.list",subject);
|
||||||
}
|
fi = OpenMacro("areamgr.notify.list", nodes.Language);
|
||||||
if (Notify==LIST_LIST){
|
break;
|
||||||
Syslog('+', "AreaMgr: List");
|
case LIST_LIST: Syslog('+', "AreaMgr: List");
|
||||||
sprintf(subject,"AreaMgr list");
|
sprintf(subject,"AreaMgr list");
|
||||||
GetRpSubject("areamgr.list",subject);
|
GetRpSubject("areamgr.list",subject);
|
||||||
}
|
fi = OpenMacro("areamgr.list", nodes.Language);
|
||||||
if (Notify==LIST_QUERY){
|
break;
|
||||||
Syslog('+', "AreaMgr: Query");
|
case LIST_QUERY: Syslog('+', "AreaMgr: Query");
|
||||||
sprintf(subject,"AreaMgr Query");
|
sprintf(subject,"AreaMgr Query");
|
||||||
GetRpSubject("areamgr.query",subject);
|
GetRpSubject("areamgr.query",subject);
|
||||||
}
|
fi = OpenMacro("areamgr.query", nodes.Language);
|
||||||
if (Notify>=LIST_UNLINK){
|
break;
|
||||||
Syslog('+', "AreaMgr: Unlinked");
|
case LIST_UNLINK: Syslog('+', "AreaMgr: Unlinked");
|
||||||
sprintf(subject,"AreaMgr: Unlinked areas");
|
sprintf(subject,"AreaMgr: Unlinked areas");
|
||||||
GetRpSubject("areamgr.unlink",subject);
|
GetRpSubject("areamgr.unlink",subject);
|
||||||
|
fi = OpenMacro("areamgr.unlink", nodes.Language);
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (fi == NULL) {
|
||||||
|
MacroClear();
|
||||||
|
free(subject);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
if ((qp = SendMgrMail(t, CFG.ct_KeepMgr, FALSE, (char *)"Areamgr", subject, replyid)) != NULL) {
|
if ((qp = SendMgrMail(t, CFG.ct_KeepMgr, FALSE, (char *)"Areamgr", subject, replyid)) != NULL) {
|
||||||
|
|
||||||
@ -196,24 +169,12 @@ void A_List(faddr *t, char *replyid, int Notify)
|
|||||||
*/
|
*/
|
||||||
msgptr = ftell(qp);
|
msgptr = ftell(qp);
|
||||||
|
|
||||||
if (Notify==LIST_LIST){
|
if ((Notify == LIST_LIST) || (Notify == LIST_NOTIFY))
|
||||||
fi=OpenMacro("areamgr.list", nodes.Language);
|
|
||||||
WriteMailGroups(qp, f);
|
WriteMailGroups(qp, f);
|
||||||
}
|
|
||||||
if (Notify==LIST_NOTIFY){
|
|
||||||
fi=OpenMacro("areamgr.notify.list", nodes.Language);
|
|
||||||
WriteMailGroups(qp, f);
|
|
||||||
}
|
|
||||||
if (Notify==LIST_QUERY)
|
|
||||||
fi=OpenMacro("areamgr.query", nodes.Language);
|
|
||||||
if (Notify>=LIST_UNLINK)
|
|
||||||
fi=OpenMacro("areamgr.unlink", nodes.Language);
|
|
||||||
if (fi != NULL){
|
|
||||||
MacroRead(fi, qp);
|
MacroRead(fi, qp);
|
||||||
fgetpos(fi,&fileptr);
|
fgetpos(fi,&fileptr);
|
||||||
}else{
|
|
||||||
fprintf(qp, "The following is a list of message areas\r\r");
|
|
||||||
}
|
|
||||||
temp = calloc(PATH_MAX, sizeof(char));
|
temp = calloc(PATH_MAX, sizeof(char));
|
||||||
sprintf(temp, "%s/etc/mareas.data", getenv("MBSE_ROOT"));
|
sprintf(temp, "%s/etc/mareas.data", getenv("MBSE_ROOT"));
|
||||||
if ((mp = fopen(temp, "r")) == NULL) {
|
if ((mp = fopen(temp, "r")) == NULL) {
|
||||||
@ -221,6 +182,7 @@ void A_List(faddr *t, char *replyid, int Notify)
|
|||||||
free(temp);
|
free(temp);
|
||||||
free(subject);
|
free(subject);
|
||||||
MacroClear();
|
MacroClear();
|
||||||
|
fclose(fi);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
fread(&msgshdr, sizeof(msgshdr), 1, mp);
|
fread(&msgshdr, sizeof(msgshdr), 1, mp);
|
||||||
@ -233,6 +195,7 @@ void A_List(faddr *t, char *replyid, int Notify)
|
|||||||
free(subject);
|
free(subject);
|
||||||
MacroClear();
|
MacroClear();
|
||||||
fclose(mp);
|
fclose(mp);
|
||||||
|
fclose(fi);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
fread(&mgrouphdr, sizeof(mgrouphdr), 1, gp);
|
fread(&mgrouphdr, sizeof(mgrouphdr), 1, gp);
|
||||||
@ -248,19 +211,12 @@ void A_List(faddr *t, char *replyid, int Notify)
|
|||||||
while (fread(&mgroup, mgrouphdr.recsize, 1, gp) == 1) {
|
while (fread(&mgroup, mgrouphdr.recsize, 1, gp) == 1) {
|
||||||
g = bestaka_s(fido2faddr(mgroup.UseAka));
|
g = bestaka_s(fido2faddr(mgroup.UseAka));
|
||||||
if ((!strcmp(mgroup.Name, Group)) &&
|
if ((!strcmp(mgroup.Name, Group)) &&
|
||||||
(g->zone == f->zone) && (g->net == f->net) &&
|
(g->zone == f->zone) && (g->net == f->net) && (g->node == f->node) && (g->point == f->point)) {
|
||||||
(g->node == f->node) && (g->point == f->point)) {
|
|
||||||
SubTot = 0;
|
SubTot = 0;
|
||||||
if (fi != NULL){
|
|
||||||
MacroVars("GJI", "sss",mgroup.Name, mgroup.Comment, aka2str(mgroup.UseAka) );
|
MacroVars("GJI", "sss",mgroup.Name, mgroup.Comment, aka2str(mgroup.UseAka) );
|
||||||
fsetpos(fi,&fileptr);
|
fsetpos(fi,&fileptr);
|
||||||
MacroRead(fi, qp);
|
MacroRead(fi, qp);
|
||||||
fgetpos(fi,&fileptr1);
|
fgetpos(fi,&fileptr1);
|
||||||
}else{
|
|
||||||
fprintf(qp, "Group %s - %s (%s)\r\r", mgroup.Name, mgroup.Comment, aka2str(mgroup.UseAka));
|
|
||||||
fprintf(qp, "Con Message area Description\r");
|
|
||||||
fprintf(qp, "----------------------------------------------------------------------------\r");
|
|
||||||
}
|
|
||||||
fseek(mp, msgshdr.hdrsize, SEEK_SET);
|
fseek(mp, msgshdr.hdrsize, SEEK_SET);
|
||||||
|
|
||||||
while (fread(&msgs, msgshdr.recsize, 1, mp) == 1) {
|
while (fread(&msgs, msgshdr.recsize, 1, mp) == 1) {
|
||||||
@ -285,11 +241,9 @@ void A_List(faddr *t, char *replyid, int Notify)
|
|||||||
Stat[3] = 'C';
|
Stat[3] = 'C';
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if ( (Notify == LIST_LIST)
|
if ( (Notify == LIST_LIST) || (Notify == LIST_NOTIFY)
|
||||||
|| (Notify == LIST_NOTIFY)
|
|
||||||
|| ((Notify == LIST_QUERY) && ((Stat[0]=='S') || (Stat[1]=='R')))
|
|| ((Notify == LIST_QUERY) && ((Stat[0]=='S') || (Stat[1]=='R')))
|
||||||
|| ((Notify >= LIST_UNLINK) && ((Stat[0]!='S') && (Stat[1]!='R')))){
|
|| ((Notify >= LIST_UNLINK) && ((Stat[0]!='S') && (Stat[1]!='R')))){
|
||||||
if (fi !=NULL){
|
|
||||||
MacroVars("XDEsrpc", "sssdddd",
|
MacroVars("XDEsrpc", "sssdddd",
|
||||||
Stat, msgs.Tag, msgs.Name,
|
Stat, msgs.Tag, msgs.Name,
|
||||||
(Stat[0] == 'S'),
|
(Stat[0] == 'S'),
|
||||||
@ -300,16 +254,12 @@ void A_List(faddr *t, char *replyid, int Notify)
|
|||||||
fsetpos(fi,&fileptr1);
|
fsetpos(fi,&fileptr1);
|
||||||
MacroRead(fi, qp);
|
MacroRead(fi, qp);
|
||||||
fgetpos(fi,&fileptr2);
|
fgetpos(fi,&fileptr2);
|
||||||
}else{
|
|
||||||
fprintf(qp, "%s %-25s %s\r", Stat, msgs.Tag, msgs.Name);
|
|
||||||
}
|
|
||||||
SubTot++;
|
SubTot++;
|
||||||
Total++;
|
Total++;
|
||||||
}
|
}
|
||||||
} else
|
} else
|
||||||
fseek(mp, msgshdr.syssize, SEEK_CUR);
|
fseek(mp, msgshdr.syssize, SEEK_CUR);
|
||||||
}
|
}
|
||||||
if (fi != NULL){
|
|
||||||
MacroVars("ZC", "dd", (int) 0 , SubTot );
|
MacroVars("ZC", "dd", (int) 0 , SubTot );
|
||||||
fsetpos(fi,&fileptr2);
|
fsetpos(fi,&fileptr2);
|
||||||
if (((ftell(qp) - msgptr) / 1024) >= CFG.new_split) {
|
if (((ftell(qp) - msgptr) / 1024) >= CFG.new_split) {
|
||||||
@ -320,36 +270,14 @@ void A_List(faddr *t, char *replyid, int Notify)
|
|||||||
msgptr = ftell(qp);
|
msgptr = ftell(qp);
|
||||||
}
|
}
|
||||||
MacroRead(fi, qp);
|
MacroRead(fi, qp);
|
||||||
}else{
|
}
|
||||||
fprintf(qp, "----------------------------------------------------------------------------\r");
|
}
|
||||||
fprintf(qp, "%d area(s)\r\r\r", SubTot);
|
}
|
||||||
|
|
||||||
if (((ftell(qp) - msgptr) / 1024) >= CFG.new_split) {
|
|
||||||
fprintf(qp, "To be continued....\r\r");
|
|
||||||
Syslog('-', " Splitting message at %ld bytes", ftell(qp) - msgptr);
|
|
||||||
CloseMail(qp, t);
|
|
||||||
qp = SendMgrMail(t, CFG.ct_KeepMgr, FALSE, (char *)"Areamgr", subject, replyid);
|
|
||||||
msgptr = ftell(qp);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
if (fi != NULL){
|
|
||||||
MacroVars("B", "d", Total );
|
MacroVars("B", "d", Total );
|
||||||
MacroRead(fi, qp);
|
MacroRead(fi, qp);
|
||||||
MacroClear();
|
MacroClear();
|
||||||
fclose(fi);
|
fclose(fi);
|
||||||
}else{
|
|
||||||
fprintf(qp, "Total: %d available area(s)\r\r\r", Total);
|
|
||||||
|
|
||||||
fprintf(qp, "Con means:\r");
|
|
||||||
fprintf(qp, " R - You receive mail from my system\r");
|
|
||||||
fprintf(qp, " S - You may send mail to my system\r");
|
|
||||||
fprintf(qp, " P - The message area is temporary paused\r");
|
|
||||||
fprintf(qp, " C - You are cutoff from this area\r\r");
|
|
||||||
fprintf(qp, "With regards, %s\r\r", CFG.sysop_name);
|
|
||||||
}
|
|
||||||
fclose(mp);
|
fclose(mp);
|
||||||
fclose(gp);
|
fclose(gp);
|
||||||
fprintf(qp, "%s\r", TearLine());
|
fprintf(qp, "%s\r", TearLine());
|
||||||
@ -393,18 +321,21 @@ void A_Flow(faddr *t, char *replyid, int Notify)
|
|||||||
Syslog('+', "AreaMgr: Flow report to %s", ascfnode(t, 0xff));
|
Syslog('+', "AreaMgr: Flow report to %s", ascfnode(t, 0xff));
|
||||||
sprintf(subject,"AreaMgr Notify Flow Report");
|
sprintf(subject,"AreaMgr Notify Flow Report");
|
||||||
GetRpSubject("areamgr.notify.flow",subject);
|
GetRpSubject("areamgr.notify.flow",subject);
|
||||||
|
fi = OpenMacro("areamgr.notify.flow", nodes.Language);
|
||||||
}else{
|
}else{
|
||||||
Syslog('+', "AreaMgr: Flow report");
|
Syslog('+', "AreaMgr: Flow report");
|
||||||
sprintf(subject,"AreaMgr Flow Report");
|
sprintf(subject,"AreaMgr Flow Report");
|
||||||
GetRpSubject("areamgr.flow",subject);
|
GetRpSubject("areamgr.flow",subject);
|
||||||
|
fi = OpenMacro("areamgr.flow", nodes.Language);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (fi == 0) {
|
||||||
|
free(subject);
|
||||||
|
MacroClear();
|
||||||
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if ((qp = SendMgrMail(t, CFG.ct_KeepMgr, FALSE, (char *)"Areamgr", subject, replyid)) != NULL) {
|
if ((qp = SendMgrMail(t, CFG.ct_KeepMgr, FALSE, (char *)"Areamgr", subject, replyid)) != NULL) {
|
||||||
if (Notify) {
|
|
||||||
fi = OpenMacro("areamgr.notify.flow", nodes.Language);
|
|
||||||
} else {
|
|
||||||
fi = OpenMacro("areamgr.flow", nodes.Language);
|
|
||||||
}
|
|
||||||
/*
|
/*
|
||||||
* Mark begin of message in .pkt
|
* Mark begin of message in .pkt
|
||||||
*/
|
*/
|
||||||
@ -416,10 +347,8 @@ void A_Flow(faddr *t, char *replyid, int Notify)
|
|||||||
WriteError("$Can't open %s", temp);
|
WriteError("$Can't open %s", temp);
|
||||||
free(temp);
|
free(temp);
|
||||||
free(subject);
|
free(subject);
|
||||||
if (fi) {
|
|
||||||
fclose(fi);
|
fclose(fi);
|
||||||
MacroClear();
|
MacroClear();
|
||||||
}
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
fread(&msgshdr, sizeof(msgshdr), 1, mp);
|
fread(&msgshdr, sizeof(msgshdr), 1, mp);
|
||||||
@ -431,20 +360,16 @@ void A_Flow(faddr *t, char *replyid, int Notify)
|
|||||||
free(temp);
|
free(temp);
|
||||||
free(subject);
|
free(subject);
|
||||||
fclose(mp);
|
fclose(mp);
|
||||||
if (fi) {
|
|
||||||
fclose(fi);
|
fclose(fi);
|
||||||
MacroClear();
|
MacroClear();
|
||||||
}
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
fread(&mgrouphdr, sizeof(mgrouphdr), 1, gp);
|
fread(&mgrouphdr, sizeof(mgrouphdr), 1, gp);
|
||||||
free(temp);
|
free(temp);
|
||||||
if (fi != NULL){
|
|
||||||
MacroRead(fi, qp);
|
MacroRead(fi, qp);
|
||||||
fgetpos(fi,&fileptr);
|
fgetpos(fi,&fileptr);
|
||||||
}else{
|
|
||||||
fprintf(qp, "The following is a flow report of all message areas\r\r");
|
|
||||||
}
|
|
||||||
while (TRUE) {
|
while (TRUE) {
|
||||||
Group = GetNodeMailGrp(First);
|
Group = GetNodeMailGrp(First);
|
||||||
if (Group == NULL)
|
if (Group == NULL)
|
||||||
@ -456,19 +381,12 @@ void A_Flow(faddr *t, char *replyid, int Notify)
|
|||||||
while (fread(&mgroup, mgrouphdr.recsize, 1, gp) == 1) {
|
while (fread(&mgroup, mgrouphdr.recsize, 1, gp) == 1) {
|
||||||
g = bestaka_s(fido2faddr(mgroup.UseAka));
|
g = bestaka_s(fido2faddr(mgroup.UseAka));
|
||||||
if ((!strcmp(mgroup.Name, Group)) &&
|
if ((!strcmp(mgroup.Name, Group)) &&
|
||||||
(g->zone == f->zone) && (g->net == f->net) &&
|
(g->zone == f->zone) && (g->net == f->net) && (g->node == f->node) && (g->point == f->point)) {
|
||||||
(g->node == f->node) && (g->point == f->point)) {
|
|
||||||
|
|
||||||
if (fi != NULL){
|
|
||||||
MacroVars("GJI", "sss",mgroup.Name, mgroup.Comment, aka2str(mgroup.UseAka) );
|
MacroVars("GJI", "sss",mgroup.Name, mgroup.Comment, aka2str(mgroup.UseAka) );
|
||||||
fsetpos(fi,&fileptr);
|
fsetpos(fi,&fileptr);
|
||||||
MacroRead(fi, qp);
|
MacroRead(fi, qp);
|
||||||
fgetpos(fi,&fileptr1);
|
fgetpos(fi,&fileptr1);
|
||||||
}else{
|
|
||||||
fprintf(qp, "Group %s - %s\r\r", mgroup.Name, mgroup.Comment);
|
|
||||||
fprintf(qp, "Con Message area Last week Last Month\r");
|
|
||||||
fprintf(qp, "---------------------------------------------------------------------------\r");
|
|
||||||
}
|
|
||||||
fseek(mp, msgshdr.hdrsize, SEEK_SET);
|
fseek(mp, msgshdr.hdrsize, SEEK_SET);
|
||||||
|
|
||||||
while (fread(&msgs, msgshdr.recsize, 1, mp) == 1) {
|
while (fread(&msgs, msgshdr.recsize, 1, mp) == 1) {
|
||||||
@ -487,7 +405,6 @@ void A_Flow(faddr *t, char *replyid, int Notify)
|
|||||||
Stat[0] = 'C';
|
Stat[0] = 'C';
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (fi !=NULL){
|
|
||||||
MacroVars("XAPQRpqrx", "csddddddd",
|
MacroVars("XAPQRpqrx", "csddddddd",
|
||||||
Stat[0],
|
Stat[0],
|
||||||
msgs.Tag,
|
msgs.Tag,
|
||||||
@ -502,10 +419,6 @@ void A_Flow(faddr *t, char *replyid, int Notify)
|
|||||||
fsetpos(fi,&fileptr1);
|
fsetpos(fi,&fileptr1);
|
||||||
MacroRead(fi, qp);
|
MacroRead(fi, qp);
|
||||||
fgetpos(fi,&fileptr2);
|
fgetpos(fi,&fileptr2);
|
||||||
}else{
|
|
||||||
fprintf(qp, "%s %s %9lu %10lu\r", Stat, padleft(msgs.Tag, 50, ' '),
|
|
||||||
msgs.Received.lweek, msgs.Received.month[lmonth]);
|
|
||||||
}
|
|
||||||
rlm += msgs.Received.month[lmonth];
|
rlm += msgs.Received.month[lmonth];
|
||||||
rlw += msgs.Received.lweek;
|
rlw += msgs.Received.lweek;
|
||||||
rlt += msgs.Received.total;
|
rlt += msgs.Received.total;
|
||||||
@ -515,7 +428,6 @@ void A_Flow(faddr *t, char *replyid, int Notify)
|
|||||||
} else
|
} else
|
||||||
fseek(mp, msgshdr.syssize, SEEK_CUR);
|
fseek(mp, msgshdr.syssize, SEEK_CUR);
|
||||||
}
|
}
|
||||||
if (fi != NULL){
|
|
||||||
MacroVars("ZBCDbcd", "ddddddd", (int) 0 , rlw, rlm, rlt, plw, plm, plt);
|
MacroVars("ZBCDbcd", "ddddddd", (int) 0 , rlw, rlm, rlt, plw, plm, plt);
|
||||||
fsetpos(fi,&fileptr2);
|
fsetpos(fi,&fileptr2);
|
||||||
if (((ftell(qp) - msgptr) / 1024) >= CFG.new_split) {
|
if (((ftell(qp) - msgptr) / 1024) >= CFG.new_split) {
|
||||||
@ -526,33 +438,14 @@ void A_Flow(faddr *t, char *replyid, int Notify)
|
|||||||
msgptr = ftell(qp);
|
msgptr = ftell(qp);
|
||||||
}
|
}
|
||||||
MacroRead(fi, qp);
|
MacroRead(fi, qp);
|
||||||
}else{
|
}
|
||||||
fprintf(qp, "---------------------------------------------------------------------------\r");
|
}
|
||||||
fprintf(qp, "Total %58lu %10lu\r\r\r", rlw, rlm);
|
}
|
||||||
|
|
||||||
if (((ftell(qp) - msgptr) / 1024) >= CFG.new_split) {
|
|
||||||
fprintf(qp, "To be continued....\r\r");
|
|
||||||
Syslog('-', " Splitting message at %ld bytes", ftell(qp) - msgptr);
|
|
||||||
CloseMail(qp, t);
|
|
||||||
qp = SendMgrMail(t, CFG.ct_KeepMgr, FALSE, (char *)"Areamgr", subject, replyid);
|
|
||||||
msgptr = ftell(qp);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
if (fi != NULL){
|
|
||||||
MacroRead(fi, qp);
|
MacroRead(fi, qp);
|
||||||
MacroClear();
|
MacroClear();
|
||||||
fclose(fi);
|
fclose(fi);
|
||||||
}else{
|
|
||||||
fprintf(qp, "Con means:\r");
|
|
||||||
fprintf(qp, " C - You connected to this area\r");
|
|
||||||
fprintf(qp, "With regards, %s\r\r", CFG.sysop_name);
|
|
||||||
fprintf(qp, "%s\r", TearLine());
|
|
||||||
}
|
|
||||||
CloseMail(qp, t);
|
CloseMail(qp, t);
|
||||||
|
|
||||||
fclose(mp);
|
fclose(mp);
|
||||||
fclose(gp);
|
fclose(gp);
|
||||||
} else
|
} else
|
||||||
@ -594,30 +487,17 @@ 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");
|
Syslog('+', "AreaMgr: Status");
|
||||||
|
|
||||||
|
if ((fi = OpenMacro("areamgr.status", nodes.Language)) == NULL ){
|
||||||
|
MacroClear();
|
||||||
|
free(subject);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
if ((fp = SendMgrMail(t, CFG.ct_KeepMgr, FALSE, (char *)"Areamgr", subject, replyid)) != NULL) {
|
if ((fp = SendMgrMail(t, CFG.ct_KeepMgr, FALSE, (char *)"Areamgr", subject, replyid)) != NULL) {
|
||||||
if ( (fi=OpenMacro("areamgr.status", nodes.Language)) != NULL ){
|
|
||||||
MacroRead(fi, fp);
|
MacroRead(fi, fp);
|
||||||
fclose(fi);
|
fclose(fi);
|
||||||
}else{
|
|
||||||
fprintf(fp, "Here is your (echo)mail status:\r\r");
|
|
||||||
fprintf(fp, "Netmail direct %s\r", GetBool(nodes.Direct));
|
|
||||||
fprintf(fp, "Netmail crash %s\r", GetBool(nodes.Crash));
|
|
||||||
fprintf(fp, "Netmail hold %s\r", GetBool(nodes.Hold));
|
|
||||||
if (nodes.RouteVia.zone)
|
|
||||||
fprintf(fp, "Route via %s\r", aka2str(nodes.RouteVia));
|
|
||||||
fprintf(fp, "\r\rMailflow:\r\r");
|
|
||||||
fprintf(fp, " Last week Last month Total ever\r");
|
|
||||||
fprintf(fp, " ---------- ---------- ----------\r");
|
|
||||||
fprintf(fp, "Messages to you %-10ld %-10ld %-10ld\r", nodes.MailSent.lweek,
|
|
||||||
nodes.MailSent.month[i], nodes.MailSent.total);
|
|
||||||
fprintf(fp, "Messages from you %-10ld %-10ld %-10ld\r", nodes.MailRcvd.lweek,
|
|
||||||
nodes.MailRcvd.month[i], nodes.MailRcvd.total);
|
|
||||||
|
|
||||||
fprintf(fp, "\rWith regards, %s\r\r", CFG.sysop_name);
|
|
||||||
}
|
|
||||||
fprintf(fp, "%s\r", TearLine());
|
fprintf(fp, "%s\r", TearLine());
|
||||||
CloseMail(fp, t);
|
CloseMail(fp, t);
|
||||||
} else
|
} else
|
||||||
@ -652,8 +532,7 @@ void A_Disconnect(faddr *t, char *Area, FILE *tmp)
|
|||||||
if (!SearchMsgs(Area)) {
|
if (!SearchMsgs(Area)) {
|
||||||
MacroVars("SsP", "sss", CFG.sysop_name, nodes.Sysop, "Areamgr");
|
MacroVars("SsP", "sss", CFG.sysop_name, nodes.Sysop, "Areamgr");
|
||||||
MacroVars("RABCDE", "ssssss","ERR_DISC_NOTFOUND",Area,"","","","");
|
MacroVars("RABCDE", "ssssss","ERR_DISC_NOTFOUND",Area,"","","","");
|
||||||
if (!MsgResult("areamgr.responses",tmp))
|
MsgResult("areamgr.responses",tmp);
|
||||||
fprintf(tmp, "Area %s not found\n", Area);
|
|
||||||
Syslog('+', " Area not found");
|
Syslog('+', " Area not found");
|
||||||
MacroClear();
|
MacroClear();
|
||||||
return;
|
return;
|
||||||
@ -670,8 +549,7 @@ void A_Disconnect(faddr *t, char *Area, FILE *tmp)
|
|||||||
if (Group == NULL) {
|
if (Group == NULL) {
|
||||||
MacroVars("SsP", "sss", CFG.sysop_name, nodes.Sysop, "Areamgr");
|
MacroVars("SsP", "sss", CFG.sysop_name, nodes.Sysop, "Areamgr");
|
||||||
MacroVars("RABCDE", "ssssss","ERR_DISC_NOTGROUP",Area,"","","","");
|
MacroVars("RABCDE", "ssssss","ERR_DISC_NOTGROUP",Area,"","","","");
|
||||||
if (!MsgResult("areamgr.responses",tmp))
|
MsgResult("areamgr.responses",tmp);
|
||||||
fprintf(tmp, "You may not disconnect from area %s\n", Area);
|
|
||||||
Syslog('+', " Group %s not available for %s", mgroup.Name, ascfnode(t, 0x1f));
|
Syslog('+', " Group %s not available for %s", mgroup.Name, ascfnode(t, 0x1f));
|
||||||
MacroClear();
|
MacroClear();
|
||||||
return;
|
return;
|
||||||
@ -684,8 +562,7 @@ void A_Disconnect(faddr *t, char *Area, FILE *tmp)
|
|||||||
if (i >= METRIC_NET) {
|
if (i >= METRIC_NET) {
|
||||||
MacroVars("SsP", "sss", CFG.sysop_name, nodes.Sysop, "Areamgr");
|
MacroVars("SsP", "sss", CFG.sysop_name, nodes.Sysop, "Areamgr");
|
||||||
MacroVars("RABCDE", "ssssss","ERR_DISC_BADADD",Area,ascfnode(t, 0x1f),"","","");
|
MacroVars("RABCDE", "ssssss","ERR_DISC_BADADD",Area,ascfnode(t, 0x1f),"","","");
|
||||||
if (!MsgResult("areamgr.responses",tmp))
|
MsgResult("areamgr.responses",tmp);
|
||||||
fprintf(tmp, "You may not disconnect area %s with nodenumber %s\n", Area, ascfnode(t, 0x1f));
|
|
||||||
Syslog('+', " %s may not disconnect from group %s", ascfnode(t, 0x1f), mgroup.Name);
|
Syslog('+', " %s may not disconnect from group %s", ascfnode(t, 0x1f), mgroup.Name);
|
||||||
MacroClear();
|
MacroClear();
|
||||||
return;
|
return;
|
||||||
@ -699,8 +576,7 @@ void A_Disconnect(faddr *t, char *Area, FILE *tmp)
|
|||||||
if (!MsgSystemConnected(Sys)) {
|
if (!MsgSystemConnected(Sys)) {
|
||||||
MacroVars("SsP", "sss", CFG.sysop_name, nodes.Sysop,"Areamgr");
|
MacroVars("SsP", "sss", CFG.sysop_name, nodes.Sysop,"Areamgr");
|
||||||
MacroVars("RABCDE", "ssssss","ERR_DISC_NC",Area,"","","","");
|
MacroVars("RABCDE", "ssssss","ERR_DISC_NC",Area,"","","","");
|
||||||
if (!MsgResult("areamgr.responses",tmp))
|
MsgResult("areamgr.responses",tmp);
|
||||||
fprintf(tmp, "You are not connected to %s\n", Area);
|
|
||||||
Syslog('+', " %s is not connected to %s", ascfnode(t, 0x1f), Area);
|
Syslog('+', " %s is not connected to %s", ascfnode(t, 0x1f), Area);
|
||||||
MacroClear();
|
MacroClear();
|
||||||
return;
|
return;
|
||||||
@ -715,16 +591,14 @@ void A_Disconnect(faddr *t, char *Area, FILE *tmp)
|
|||||||
Syslog('+', "Disconnected echo area %s", Area);
|
Syslog('+', "Disconnected echo area %s", Area);
|
||||||
MacroVars("SsP", "sss", CFG.sysop_name, nodes.Sysop,"Areamgr");
|
MacroVars("SsP", "sss", CFG.sysop_name, nodes.Sysop,"Areamgr");
|
||||||
MacroVars("RABCDE", "ssssss","OK_DISC",Area,"","","","");
|
MacroVars("RABCDE", "ssssss","OK_DISC",Area,"","","","");
|
||||||
if (!MsgResult("areamgr.responses",tmp))
|
MsgResult("areamgr.responses",tmp);
|
||||||
fprintf(tmp, "Disconnected from area %s\n", Area);
|
|
||||||
MacroClear();
|
MacroClear();
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
MacroVars("SsP", "sss", CFG.sysop_name, nodes.Sysop,"Areamgr");
|
MacroVars("SsP", "sss", CFG.sysop_name, nodes.Sysop,"Areamgr");
|
||||||
MacroVars("RABCDE", "ssssss","ERR_DISC_NOTAVAIL",Area,"","","","");
|
MacroVars("RABCDE", "ssssss","ERR_DISC_NOTAVAIL",Area,"","","","");
|
||||||
if (!MsgResult("areamgr.responses",tmp))
|
MsgResult("areamgr.responses",tmp);
|
||||||
fprintf(tmp, "You may not disconnect area %s\n", Area);
|
|
||||||
Syslog('+', "Didn't disconnect %s from mandatory or cutoff echo area %s", ascfnode(t, 0x1f), Area);
|
Syslog('+', "Didn't disconnect %s from mandatory or cutoff echo area %s", ascfnode(t, 0x1f), Area);
|
||||||
MacroClear();
|
MacroClear();
|
||||||
}
|
}
|
||||||
@ -770,8 +644,7 @@ void A_Connect(faddr *t, char *Area, FILE *tmp)
|
|||||||
if (CheckEchoGroup(Area, TRUE, t) == 0) {
|
if (CheckEchoGroup(Area, TRUE, t) == 0) {
|
||||||
MacroVars("SsP", "sss", CFG.sysop_name, nodes.Sysop,"Areamgr");
|
MacroVars("SsP", "sss", CFG.sysop_name, nodes.Sysop,"Areamgr");
|
||||||
MacroVars("RABCDE", "ssssss","ERR_CONN_FORWARD",Area,aka2str(mgroup.UpLink),"","","");
|
MacroVars("RABCDE", "ssssss","ERR_CONN_FORWARD",Area,aka2str(mgroup.UpLink),"","","");
|
||||||
if (!MsgResult("areamgr.responses",tmp))
|
MsgResult("areamgr.responses",tmp);
|
||||||
fprintf(tmp, "Area %s not available, requested from uplink %s\n", Area, aka2str(mgroup.UpLink));
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -786,8 +659,7 @@ void A_Connect(faddr *t, char *Area, FILE *tmp)
|
|||||||
if (!SearchMsgs(Area)) {
|
if (!SearchMsgs(Area)) {
|
||||||
MacroVars("SsP", "sss", CFG.sysop_name, nodes.Sysop, "Areamgr");
|
MacroVars("SsP", "sss", CFG.sysop_name, nodes.Sysop, "Areamgr");
|
||||||
MacroVars("RABCDE", "ssssss","ERR_CONN_NOTFOUND",Area,"","","","");
|
MacroVars("RABCDE", "ssssss","ERR_CONN_NOTFOUND",Area,"","","","");
|
||||||
if (!MsgResult("areamgr.responses",tmp))
|
MsgResult("areamgr.responses",tmp);
|
||||||
fprintf(tmp, "Area %s not found\n", Area);
|
|
||||||
Syslog('+', "Area %s not found", Area);
|
Syslog('+', "Area %s not found", Area);
|
||||||
MacroClear();
|
MacroClear();
|
||||||
return;
|
return;
|
||||||
@ -805,8 +677,7 @@ void A_Connect(faddr *t, char *Area, FILE *tmp)
|
|||||||
if (Group == NULL) {
|
if (Group == NULL) {
|
||||||
MacroVars("SsP", "sss", CFG.sysop_name, nodes.Sysop, "Areamgr");
|
MacroVars("SsP", "sss", CFG.sysop_name, nodes.Sysop, "Areamgr");
|
||||||
MacroVars("RABCDE", "ssssss","ERR_CONN_NOTGROUP",Area,"","","","");
|
MacroVars("RABCDE", "ssssss","ERR_CONN_NOTGROUP",Area,"","","","");
|
||||||
if (!MsgResult("areamgr.responses",tmp))
|
MsgResult("areamgr.responses",tmp);
|
||||||
fprintf(tmp, "You may not connect to area %s\n", Area);
|
|
||||||
Syslog('+', " Group %s not available for node %s", mgroup.Name, ascfnode(t, 0x1f));
|
Syslog('+', " Group %s not available for node %s", mgroup.Name, ascfnode(t, 0x1f));
|
||||||
MacroClear();
|
MacroClear();
|
||||||
return;
|
return;
|
||||||
@ -819,8 +690,7 @@ void A_Connect(faddr *t, char *Area, FILE *tmp)
|
|||||||
if (i >= METRIC_NET) {
|
if (i >= METRIC_NET) {
|
||||||
MacroVars("SsP", "sss", CFG.sysop_name, nodes.Sysop,"Areamgr");
|
MacroVars("SsP", "sss", CFG.sysop_name, nodes.Sysop,"Areamgr");
|
||||||
MacroVars("RABCDE", "ssssss","ERR_CONN_BADADD",Area,ascfnode(t, 0x1f),"","","");
|
MacroVars("RABCDE", "ssssss","ERR_CONN_BADADD",Area,ascfnode(t, 0x1f),"","","");
|
||||||
if (!MsgResult("areamgr.responses",tmp))
|
MsgResult("areamgr.responses",tmp);
|
||||||
fprintf(tmp, "You may not connect area %s with nodenumber %s\n", Area, ascfnode(t, 0x1f));
|
|
||||||
Syslog('+', " %s may not connect to group %s", ascfnode(t, 0x1f), mgroup.Name);
|
Syslog('+', " %s may not connect to group %s", ascfnode(t, 0x1f), mgroup.Name);
|
||||||
MacroClear();
|
MacroClear();
|
||||||
return;
|
return;
|
||||||
@ -834,8 +704,7 @@ void A_Connect(faddr *t, char *Area, FILE *tmp)
|
|||||||
if (MsgSystemConnected(Sys)) {
|
if (MsgSystemConnected(Sys)) {
|
||||||
MacroVars("SsP", "sss", CFG.sysop_name, nodes.Sysop,"Areamgr");
|
MacroVars("SsP", "sss", CFG.sysop_name, nodes.Sysop,"Areamgr");
|
||||||
MacroVars("RABCDE", "ssssss","ERR_CONN_ALREADY",Area,"","","","");
|
MacroVars("RABCDE", "ssssss","ERR_CONN_ALREADY",Area,"","","","");
|
||||||
if (!MsgResult("areamgr.responses",tmp))
|
MsgResult("areamgr.responses",tmp);
|
||||||
fprintf(tmp, "You are already connected to %s\n", Area);
|
|
||||||
Syslog('+', " %s is already connected to %s", ascfnode(t, 0x1f), Area);
|
Syslog('+', " %s is already connected to %s", ascfnode(t, 0x1f), Area);
|
||||||
MacroClear();
|
MacroClear();
|
||||||
return;
|
return;
|
||||||
@ -850,15 +719,13 @@ void A_Connect(faddr *t, char *Area, FILE *tmp)
|
|||||||
Syslog('+', "Connected echo area %s", Area);
|
Syslog('+', "Connected echo area %s", Area);
|
||||||
MacroVars("SsP", "sss", CFG.sysop_name, nodes.Sysop,"Areamgr");
|
MacroVars("SsP", "sss", CFG.sysop_name, nodes.Sysop,"Areamgr");
|
||||||
MacroVars("RABCDE", "ssssss","OK_CONN",Area,aka2str(msgs.Aka),"","","");
|
MacroVars("RABCDE", "ssssss","OK_CONN",Area,aka2str(msgs.Aka),"","","");
|
||||||
if (!MsgResult("areamgr.responses",tmp))
|
MsgResult("areamgr.responses",tmp);
|
||||||
fprintf(tmp, "Connected to area %s using aka %s\n", Area, aka2str(msgs.Aka));
|
|
||||||
MacroClear();
|
MacroClear();
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
MacroVars("SsP", "sss", CFG.sysop_name, nodes.Sysop,"Areamgr");
|
MacroVars("SsP", "sss", CFG.sysop_name, nodes.Sysop,"Areamgr");
|
||||||
MacroVars("RABCDE", "ssssss","ERR_CONN_NOTAVAIL",Area,"","","","");
|
MacroVars("RABCDE", "ssssss","ERR_CONN_NOTAVAIL",Area,"","","","");
|
||||||
if (!MsgResult("areamgr.responses",tmp))
|
MsgResult("areamgr.responses",tmp);
|
||||||
fprintf(tmp, "Not connected to %s, this is not allowed\n", Area);
|
|
||||||
WriteError("Can't connect node %s to echo area %s", ascfnode(t, 0x1f), Area);
|
WriteError("Can't connect node %s to echo area %s", ascfnode(t, 0x1f), Area);
|
||||||
MacroClear();
|
MacroClear();
|
||||||
}
|
}
|
||||||
@ -951,8 +818,7 @@ void A_All(faddr *t, int Connect, FILE *tmp, char *Grp)
|
|||||||
Syslog('+', "AreaMgr: Connected %s", msgs.Tag);
|
Syslog('+', "AreaMgr: Connected %s", msgs.Tag);
|
||||||
MacroVars("SsP", "sss", CFG.sysop_name, nodes.Sysop,"Areamgr");
|
MacroVars("SsP", "sss", CFG.sysop_name, nodes.Sysop,"Areamgr");
|
||||||
MacroVars("RABCDE", "ssssss","OK_CONN",msgs.Tag,aka2str(msgs.Aka),"","","");
|
MacroVars("RABCDE", "ssssss","OK_CONN",msgs.Tag,aka2str(msgs.Aka),"","","");
|
||||||
if (!MsgResult("areamgr.responses",tmp))
|
MsgResult("areamgr.responses",tmp);
|
||||||
fprintf(tmp, "Connected area %s using aka %s\n", msgs.Tag, aka2str(msgs.Aka));
|
|
||||||
MacroClear();
|
MacroClear();
|
||||||
a_list = TRUE;
|
a_list = TRUE;
|
||||||
break;
|
break;
|
||||||
@ -970,8 +836,7 @@ void A_All(faddr *t, int Connect, FILE *tmp, char *Grp)
|
|||||||
Syslog('+', "AreaMgr: Disconnected %s", msgs.Tag);
|
Syslog('+', "AreaMgr: Disconnected %s", msgs.Tag);
|
||||||
MacroVars("SsP", "sss", CFG.sysop_name, nodes.Sysop,"Areamgr");
|
MacroVars("SsP", "sss", CFG.sysop_name, nodes.Sysop,"Areamgr");
|
||||||
MacroVars("RABCDE", "ssssss","OK_DISC",msgs.Tag,"","","","");
|
MacroVars("RABCDE", "ssssss","OK_DISC",msgs.Tag,"","","","");
|
||||||
if (!MsgResult("areamgr.responses",tmp))
|
MsgResult("areamgr.responses",tmp);
|
||||||
fprintf(tmp, "Disconnected area %s\n", msgs.Tag);
|
|
||||||
MacroClear();
|
MacroClear();
|
||||||
a_list = TRUE;
|
a_list = TRUE;
|
||||||
}
|
}
|
||||||
@ -1042,8 +907,7 @@ void A_Pause(faddr *t, int Pause, FILE *tmp)
|
|||||||
Syslog('+', "AreaMgr: %s area %s", Pause?"Pause":"Resume", msgs.Tag);
|
Syslog('+', "AreaMgr: %s area %s", Pause?"Pause":"Resume", msgs.Tag);
|
||||||
MacroVars("SsP", "sss", CFG.sysop_name, nodes.Sysop,"Areamgr");
|
MacroVars("SsP", "sss", CFG.sysop_name, nodes.Sysop,"Areamgr");
|
||||||
MacroVars("RABCDE", "ssssss","OK_PAUSE",msgs.Tag,ascfnode(t, 0x1f),"","");
|
MacroVars("RABCDE", "ssssss","OK_PAUSE",msgs.Tag,ascfnode(t, 0x1f),"","");
|
||||||
if (!MsgResult("areamgr.responses",tmp))
|
MsgResult("areamgr.responses",tmp);
|
||||||
fprintf(tmp, "%s area %s\n", Pause?"Pause":"Resume", msgs.Tag);
|
|
||||||
a_list = TRUE;
|
a_list = TRUE;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -1073,24 +937,17 @@ void A_Rescan(faddr *t, char *Area, FILE *tmp)
|
|||||||
MacroVars("SsP", "sss", CFG.sysop_name, nodes.Sysop,"Areamgr");
|
MacroVars("SsP", "sss", CFG.sysop_name, nodes.Sysop,"Areamgr");
|
||||||
if (result == 0){
|
if (result == 0){
|
||||||
MacroVars("RABCDE", "ssdsss","OK_RESCAN",Area,a_msgs,"","","");
|
MacroVars("RABCDE", "ssdsss","OK_RESCAN",Area,a_msgs,"","","");
|
||||||
if (!MsgResult("areamgr.responses",tmp)){
|
MsgResult("areamgr.responses",tmp);
|
||||||
if (a_msgs > 0)
|
} else if (result == 1) {
|
||||||
fprintf(tmp, "Rescan area %s, %lu last msgs.\n", Area, a_msgs);
|
|
||||||
else
|
|
||||||
fprintf(tmp, "Rescan area %s \n", Area);
|
|
||||||
}
|
|
||||||
} else if (result == 1)
|
|
||||||
MacroVars("RABCDE", "ssssss","ERR_RESCAN_UNK",Area,"","","","");
|
MacroVars("RABCDE", "ssssss","ERR_RESCAN_UNK",Area,"","","","");
|
||||||
if (!MsgResult("areamgr.responses",tmp))
|
MsgResult("areamgr.responses",tmp);
|
||||||
fprintf(tmp, "Can't rescan unknown area %s\n", Area);
|
} else if (result == 2) {
|
||||||
else if (result == 2)
|
|
||||||
MacroVars("RABCDE", "ssssss","ERR_RESCAN_NOTAVAIL",Area,ascfnode(t, 0x1f),"","","");
|
MacroVars("RABCDE", "ssssss","ERR_RESCAN_NOTAVAIL",Area,ascfnode(t, 0x1f),"","","");
|
||||||
if (!MsgResult("areamgr.responses",tmp))
|
MsgResult("areamgr.responses",tmp);
|
||||||
fprintf(tmp, "%s can't rescan area %s\n", ascfnode(t, 0x1f), Area);
|
} else {
|
||||||
else
|
|
||||||
MacroVars("RABCDE", "ssssss","ERR_RESCAN_FATAL",Area,ascfnode(t, 0x1f),"","","");
|
MacroVars("RABCDE", "ssssss","ERR_RESCAN_FATAL",Area,ascfnode(t, 0x1f),"","","");
|
||||||
if (!MsgResult("areamgr.responses",tmp))
|
MsgResult("areamgr.responses",tmp);
|
||||||
fprintf(tmp, "Fatal Error Rescanning area %s\n", Area);
|
}
|
||||||
MacroClear();
|
MacroClear();
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1230,10 +1087,7 @@ int AreaMgr(faddr *f, faddr *t, char *replyid, char *subj, time_t mdate, int fla
|
|||||||
GetRpSubject("areamgr.responses",subject);
|
GetRpSubject("areamgr.responses",subject);
|
||||||
if ((np = SendMgrMail(f, CFG.ct_KeepMgr, FALSE, (char *)"Areamgr", subject, replyid)) != NULL) {
|
if ((np = SendMgrMail(f, CFG.ct_KeepMgr, FALSE, (char *)"Areamgr", subject, replyid)) != NULL) {
|
||||||
MacroVars("RABCDE", "ssssss","WELLCOME","","","","","");
|
MacroVars("RABCDE", "ssssss","WELLCOME","","","","","");
|
||||||
if (!MsgResult("areamgr.responses",np)){
|
MsgResult("areamgr.responses",np);
|
||||||
fprintf(np, " Dear %s\r\r", nodes.Sysop);
|
|
||||||
fprintf(np, "Here is the result of your AreaMgr request:\r\r");
|
|
||||||
}
|
|
||||||
fseek(tmp, 0, SEEK_SET);
|
fseek(tmp, 0, SEEK_SET);
|
||||||
|
|
||||||
while ((fgets(Buf, 2048, tmp)) != NULL) {
|
while ((fgets(Buf, 2048, tmp)) != NULL) {
|
||||||
@ -1244,8 +1098,7 @@ int AreaMgr(faddr *f, faddr *t, char *replyid, char *subj, time_t mdate, int fla
|
|||||||
Syslog('m', "Rep: %s", Buf);
|
Syslog('m', "Rep: %s", Buf);
|
||||||
}
|
}
|
||||||
MacroVars("RABCDE", "ssssss","GOODBYE","","","","","");
|
MacroVars("RABCDE", "ssssss","GOODBYE","","","","","");
|
||||||
if (!MsgResult("areamgr.responses",np))
|
MsgResult("areamgr.responses",np);
|
||||||
fprintf(np, "\rWith regards, %s\r\r", CFG.sysop_name);
|
|
||||||
fprintf(np, "%s\r", TearLine());
|
fprintf(np, "%s\r", TearLine());
|
||||||
CloseMail(np, t);
|
CloseMail(np, t);
|
||||||
} else
|
} else
|
||||||
@ -1276,3 +1129,4 @@ int AreaMgr(faddr *f, faddr *t, char *replyid, char *subj, time_t mdate, int fla
|
|||||||
|
|
||||||
return rc;
|
return rc;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -43,7 +43,6 @@
|
|||||||
#include "../lib/dbuser.h"
|
#include "../lib/dbuser.h"
|
||||||
#include "../lib/dbftn.h"
|
#include "../lib/dbftn.h"
|
||||||
#include "sendmail.h"
|
#include "sendmail.h"
|
||||||
#include "mgrutil.h"
|
|
||||||
#include "postnetmail.h"
|
#include "postnetmail.h"
|
||||||
#include "ping.h"
|
#include "ping.h"
|
||||||
|
|
||||||
|
240
mbfido/filemgr.c
240
mbfido/filemgr.c
@ -91,45 +91,6 @@ void F_Help(faddr *t, char *replyid)
|
|||||||
MacroRead(fi, fp);
|
MacroRead(fi, fp);
|
||||||
MacroClear();
|
MacroClear();
|
||||||
fclose(fi);
|
fclose(fi);
|
||||||
} else {
|
|
||||||
fprintf(fp, "Address all requests to '%s' (without quotes)\r", (char *)"Filemgr");
|
|
||||||
fprintf(fp, "Your FileMgr password goes on the subject line.\r\r");
|
|
||||||
|
|
||||||
fprintf(fp, "In the body of the message to FileMgr:\r\r");
|
|
||||||
|
|
||||||
fprintf(fp, "+<ticname> To connect to an fileecho area\r");
|
|
||||||
fprintf(fp, "-<ticname> To disconnect from an fileecho area\r");
|
|
||||||
fprintf(fp, "%%+ALL To connect to all fileecho areas\r");
|
|
||||||
fprintf(fp, "%%-ALL To disconnect from all fileecho areas\r");
|
|
||||||
fprintf(fp, "%%+<group> To connect all fileecho areas of a group\r");
|
|
||||||
fprintf(fp, "%%-<group> To disconnect from all fileecho areas of a group\r");
|
|
||||||
fprintf(fp, "%%HELP To request this help message\r");
|
|
||||||
fprintf(fp, "%%LIST To request a list of available fileecho areas\r");
|
|
||||||
fprintf(fp, "%%QUERY To request a list of active fileecho areas\r");
|
|
||||||
fprintf(fp, "%%UNLINKED To request a list of available fileecho areas\r");
|
|
||||||
fprintf(fp, " to which you are not already connected\r");
|
|
||||||
fprintf(fp, "%%STATUS To request a status report for your system\r");
|
|
||||||
fprintf(fp, "%%PAUSE To temporary disconnect from the connected areas\r");
|
|
||||||
fprintf(fp, "%%RESUME To reconnect the temporary disconnected areas\r");
|
|
||||||
fprintf(fp, "%%PWD=newpwd To set a new AreaMgr and FileMgr password\r");
|
|
||||||
// fprintf(fp, "%%RESCAN <area> To request all files from 'area' again\r");
|
|
||||||
fprintf(fp, "%%MESSGAE=On/Off To switch the message function on or off\r");
|
|
||||||
fprintf(fp, "%%TICK=On/Off/Advanced To set the tic file mode off, normal or advanced\r");
|
|
||||||
fprintf(fp, "%%NOTIFY=On/Off To switch the notify function on or off\r");
|
|
||||||
// fprintf(fp, "%%RESEND <name> To resend file 'name' with tic file\r");
|
|
||||||
fprintf(fp, "[---] Everything below the tearline is ignored\r\r");
|
|
||||||
|
|
||||||
fprintf(fp, "Example:\r\r");
|
|
||||||
|
|
||||||
fprintf(fp, " By: %s\r", nodes.Sysop);
|
|
||||||
fprintf(fp, " To: %s, %s\r", (char *)"Filemgr", ascfnode(bestaka_s(t), 0xf));
|
|
||||||
fprintf(fp, " Re: %s\r", nodes.Fpasswd);
|
|
||||||
fprintf(fp, " St: Pvt Local Kill\r");
|
|
||||||
fprintf(fp, " ----------------------------------------------------------\r");
|
|
||||||
fprintf(fp, " +MBSE_BBS\r");
|
|
||||||
fprintf(fp, " -NODELIST\r");
|
|
||||||
fprintf(fp, " %%QUERY\r");
|
|
||||||
fprintf(fp, " %%LIST\r\r");
|
|
||||||
}
|
}
|
||||||
fprintf(fp, "%s\r", TearLine());
|
fprintf(fp, "%s\r", TearLine());
|
||||||
CloseMail(fp, t);
|
CloseMail(fp, t);
|
||||||
@ -146,9 +107,11 @@ void F_Query(faddr *t, char *replyid)
|
|||||||
F_List(t, replyid, LIST_QUERY);
|
F_List(t, replyid, LIST_QUERY);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
void F_List(faddr *t, char *replyid, int Notify)
|
void F_List(faddr *t, char *replyid, int Notify)
|
||||||
{
|
{
|
||||||
FILE *qp, *gp, *fp, *fi;
|
FILE *qp, *gp, *fp, *fi = NULL;
|
||||||
char *temp, *Group, *subject;
|
char *temp, *Group, *subject;
|
||||||
int i, First = TRUE, SubTot, Total = 0, Cons;
|
int i, First = TRUE, SubTot, Total = 0, Cons;
|
||||||
char Stat[4];
|
char Stat[4];
|
||||||
@ -161,25 +124,33 @@ void F_List(faddr *t, char *replyid, int Notify)
|
|||||||
f = bestaka_s(t);
|
f = bestaka_s(t);
|
||||||
MacroVars("sKyY", "sdss", nodes.Sysop, Notify, ascfnode(t, 0xff), ascfnode(f, 0xf));
|
MacroVars("sKyY", "sdss", nodes.Sysop, Notify, ascfnode(t, 0xff), ascfnode(f, 0xf));
|
||||||
|
|
||||||
if (Notify==LIST_NOTIFY){
|
switch (Notify) {
|
||||||
Syslog('+', "FileMgr: Notify to %s", ascfnode(t, 0xff));
|
case LIST_NOTIFY: Syslog('+', "FileMgr: Notify to %s", ascfnode(t, 0xff));
|
||||||
sprintf(subject,"FileMgr Notify");
|
sprintf(subject,"FileMgr Notify");
|
||||||
GetRpSubject("filemgr.notify.list",subject);
|
GetRpSubject("filemgr.notify.list",subject);
|
||||||
}
|
fi=OpenMacro("filemgr.notify.list", nodes.Language);
|
||||||
if (Notify==LIST_LIST){
|
break;
|
||||||
Syslog('+', "FileMgr: List");
|
case LIST_LIST: Syslog('+', "FileMgr: List");
|
||||||
sprintf(subject,"FileMgr list");
|
sprintf(subject,"FileMgr list");
|
||||||
GetRpSubject("filemgr.list",subject);
|
GetRpSubject("filemgr.list",subject);
|
||||||
}
|
fi=OpenMacro("filemgr.list", nodes.Language);
|
||||||
if (Notify==LIST_QUERY){
|
break;
|
||||||
Syslog('+', "FileMgr: Query");
|
case LIST_QUERY: Syslog('+', "FileMgr: Query");
|
||||||
sprintf(subject,"FileMgr Query");
|
sprintf(subject,"FileMgr Query");
|
||||||
GetRpSubject("filemgr.query",subject);
|
GetRpSubject("filemgr.query",subject);
|
||||||
}
|
fi=OpenMacro("filemgr.query", nodes.Language);
|
||||||
if (Notify>=LIST_UNLINK){
|
break;
|
||||||
Syslog('+', "FileMgr: Unlinked");
|
default: Syslog('+', "FileMgr: Unlinked");
|
||||||
sprintf(subject,"FileMgr: Unlinked areas");
|
sprintf(subject,"FileMgr: Unlinked areas");
|
||||||
GetRpSubject("filemgr.unlink",subject);
|
GetRpSubject("filemgr.unlink",subject);
|
||||||
|
fi=OpenMacro("filemgr.unlink", nodes.Language);
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (fi == NULL) {
|
||||||
|
MacroClear();
|
||||||
|
free(subject);
|
||||||
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if ((qp = SendMgrMail(t, CFG.ct_KeepMgr, FALSE, (char *)"Filemgr", subject, replyid)) != NULL) {
|
if ((qp = SendMgrMail(t, CFG.ct_KeepMgr, FALSE, (char *)"Filemgr", subject, replyid)) != NULL) {
|
||||||
@ -189,25 +160,11 @@ void F_List(faddr *t, char *replyid, int Notify)
|
|||||||
*/
|
*/
|
||||||
msgptr = ftell(qp);
|
msgptr = ftell(qp);
|
||||||
|
|
||||||
fi=NULL;
|
if ((Notify == LIST_LIST) || (Notify == LIST_NOTIFY))
|
||||||
if (Notify==LIST_LIST){
|
|
||||||
fi=OpenMacro("filemgr.list", nodes.Language);
|
|
||||||
WriteFileGroups(qp, f);
|
WriteFileGroups(qp, f);
|
||||||
}
|
|
||||||
if (Notify==LIST_NOTIFY){
|
|
||||||
fi=OpenMacro("filemgr.notify.list", nodes.Language);
|
|
||||||
WriteFileGroups(qp, f);
|
|
||||||
}
|
|
||||||
if (Notify==LIST_QUERY)
|
|
||||||
fi=OpenMacro("filemgr.query", nodes.Language);
|
|
||||||
if (Notify>=LIST_UNLINK)
|
|
||||||
fi=OpenMacro("filemgr.unlink", nodes.Language);
|
|
||||||
if (fi != NULL){
|
|
||||||
MacroRead(fi, qp);
|
MacroRead(fi, qp);
|
||||||
fgetpos(fi,&fileptr);
|
fgetpos(fi,&fileptr);
|
||||||
}else{
|
|
||||||
fprintf(qp, "The following is a list of file areas\r\r");
|
|
||||||
}
|
|
||||||
temp = calloc(PATH_MAX, sizeof(char));
|
temp = calloc(PATH_MAX, sizeof(char));
|
||||||
sprintf(temp, "%s/etc/tic.data", getenv("MBSE_ROOT"));
|
sprintf(temp, "%s/etc/tic.data", getenv("MBSE_ROOT"));
|
||||||
if ((fp = fopen(temp, "r")) == NULL) {
|
if ((fp = fopen(temp, "r")) == NULL) {
|
||||||
@ -215,6 +172,7 @@ void F_List(faddr *t, char *replyid, int Notify)
|
|||||||
free(temp);
|
free(temp);
|
||||||
free(subject);
|
free(subject);
|
||||||
MacroClear();
|
MacroClear();
|
||||||
|
fclose(fi);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
fread(&tichdr, sizeof(tichdr), 1, fp);
|
fread(&tichdr, sizeof(tichdr), 1, fp);
|
||||||
@ -227,6 +185,7 @@ void F_List(faddr *t, char *replyid, int Notify)
|
|||||||
free(subject);
|
free(subject);
|
||||||
MacroClear();
|
MacroClear();
|
||||||
fclose(fp);
|
fclose(fp);
|
||||||
|
fclose(fi);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
fread(&fgrouphdr, sizeof(fgrouphdr), 1, gp);
|
fread(&fgrouphdr, sizeof(fgrouphdr), 1, gp);
|
||||||
@ -242,19 +201,12 @@ void F_List(faddr *t, char *replyid, int Notify)
|
|||||||
while (fread(&fgroup, fgrouphdr.recsize, 1, gp) == 1) {
|
while (fread(&fgroup, fgrouphdr.recsize, 1, gp) == 1) {
|
||||||
g = bestaka_s(fido2faddr(fgroup.UseAka));
|
g = bestaka_s(fido2faddr(fgroup.UseAka));
|
||||||
if ((!strcmp(fgroup.Name, Group)) &&
|
if ((!strcmp(fgroup.Name, Group)) &&
|
||||||
(g->zone == f->zone) && (g->net == f->net) &&
|
(g->zone == f->zone) && (g->net == f->net) && (g->node == f->node) && (g->point == f->point)) {
|
||||||
(g->node == f->node) && (g->point == f->point)) {
|
|
||||||
SubTot = 0;
|
SubTot = 0;
|
||||||
if (fi != NULL){
|
|
||||||
MacroVars("GJI", "sss",fgroup.Name, fgroup.Comment, aka2str(fgroup.UseAka) );
|
MacroVars("GJI", "sss",fgroup.Name, fgroup.Comment, aka2str(fgroup.UseAka) );
|
||||||
fsetpos(fi,&fileptr);
|
fsetpos(fi,&fileptr);
|
||||||
MacroRead(fi, qp);
|
MacroRead(fi, qp);
|
||||||
fgetpos(fi,&fileptr1);
|
fgetpos(fi,&fileptr1);
|
||||||
}else{
|
|
||||||
fprintf(qp, "Group %s - %s (%s)\r\r", fgroup.Name, fgroup.Comment, aka2str(fgroup.UseAka));
|
|
||||||
fprintf(qp, "Con File tic Description\r");
|
|
||||||
fprintf(qp, "------------------------------------------------------------------------\r");
|
|
||||||
}
|
|
||||||
fseek(fp, tichdr.hdrsize, SEEK_SET);
|
fseek(fp, tichdr.hdrsize, SEEK_SET);
|
||||||
|
|
||||||
while (fread(&tic, tichdr.recsize, 1, fp) == 1) {
|
while (fread(&tic, tichdr.recsize, 1, fp) == 1) {
|
||||||
@ -281,7 +233,6 @@ void F_List(faddr *t, char *replyid, int Notify)
|
|||||||
|| (Notify == LIST_NOTIFY)
|
|| (Notify == LIST_NOTIFY)
|
||||||
|| ((Notify == LIST_QUERY) && ((Stat[0]=='S') || (Stat[1]=='R')))
|
|| ((Notify == LIST_QUERY) && ((Stat[0]=='S') || (Stat[1]=='R')))
|
||||||
|| ((Notify >= LIST_UNLINK) && ((Stat[0]!='S') && (Stat[1]!='R')))){
|
|| ((Notify >= LIST_UNLINK) && ((Stat[0]!='S') && (Stat[1]!='R')))){
|
||||||
if (fi !=NULL){
|
|
||||||
MacroVars("XDEsrp", "sssddd",
|
MacroVars("XDEsrp", "sssddd",
|
||||||
Stat, tic.Name, tic.Comment,
|
Stat, tic.Name, tic.Comment,
|
||||||
(Stat[0] == 'S'),
|
(Stat[0] == 'S'),
|
||||||
@ -291,16 +242,12 @@ void F_List(faddr *t, char *replyid, int Notify)
|
|||||||
fsetpos(fi,&fileptr1);
|
fsetpos(fi,&fileptr1);
|
||||||
MacroRead(fi, qp);
|
MacroRead(fi, qp);
|
||||||
fgetpos(fi,&fileptr2);
|
fgetpos(fi,&fileptr2);
|
||||||
}else{
|
|
||||||
fprintf(qp, "%s %-20s %s\r", Stat, tic.Name, tic.Comment);
|
|
||||||
}
|
|
||||||
SubTot++;
|
SubTot++;
|
||||||
Total++;
|
Total++;
|
||||||
}
|
}
|
||||||
} else
|
} else
|
||||||
fseek(fp, tichdr.syssize, SEEK_CUR);
|
fseek(fp, tichdr.syssize, SEEK_CUR);
|
||||||
}
|
}
|
||||||
if (fi != NULL){
|
|
||||||
MacroVars("ZA", "dd", (int) 0 , SubTot );
|
MacroVars("ZA", "dd", (int) 0 , SubTot );
|
||||||
fsetpos(fi,&fileptr2);
|
fsetpos(fi,&fileptr2);
|
||||||
if (((ftell(qp) - msgptr) / 1024) >= CFG.new_split) {
|
if (((ftell(qp) - msgptr) / 1024) >= CFG.new_split) {
|
||||||
@ -311,36 +258,14 @@ void F_List(faddr *t, char *replyid, int Notify)
|
|||||||
msgptr = ftell(qp);
|
msgptr = ftell(qp);
|
||||||
}
|
}
|
||||||
MacroRead(fi, qp);
|
MacroRead(fi, qp);
|
||||||
}else{
|
|
||||||
fprintf(qp, "------------------------------------------------------------------------\r");
|
|
||||||
fprintf(qp, "%d available area(s)\r\r\r", SubTot);
|
|
||||||
|
|
||||||
if (((ftell(qp) - msgptr) / 1024) >= CFG.new_split) {
|
|
||||||
fprintf(qp, "To be continued....\r\r");
|
|
||||||
Syslog('-', " Splitting message at %ld bytes", ftell(qp) - msgptr);
|
|
||||||
CloseMail(qp, t);
|
|
||||||
qp = SendMgrMail(t, CFG.ct_KeepMgr, FALSE, (char *)"Filemgr", subject, replyid);
|
|
||||||
msgptr = ftell(qp);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (fi != NULL){
|
|
||||||
MacroVars("B", "d", Total );
|
MacroVars("B", "d", Total );
|
||||||
MacroRead(fi, qp);
|
MacroRead(fi, qp);
|
||||||
MacroClear();
|
MacroClear();
|
||||||
fclose(fi);
|
fclose(fi);
|
||||||
}else{
|
|
||||||
fprintf(qp, "Total: %d available area(s)\r\r\r", Total);
|
|
||||||
|
|
||||||
fprintf(qp, "Con means:\r");
|
|
||||||
fprintf(qp, " R - You receive files from my system\r");
|
|
||||||
fprintf(qp, " S - You may send files in this area\r");
|
|
||||||
fprintf(qp, " P - The file area is temporary paused\r\r");
|
|
||||||
fprintf(qp, "With regards, %s\r\r", CFG.sysop_name);
|
|
||||||
}
|
|
||||||
fclose(fp);
|
fclose(fp);
|
||||||
fclose(gp);
|
fclose(gp);
|
||||||
fprintf(qp, "%s\r", TearLine());
|
fprintf(qp, "%s\r", TearLine());
|
||||||
@ -393,42 +318,16 @@ void F_Status(faddr *t, char *replyid)
|
|||||||
);
|
);
|
||||||
GetRpSubject("filemgr.status",subject);
|
GetRpSubject("filemgr.status",subject);
|
||||||
|
|
||||||
|
if ((fi = OpenMacro("filemgr.status", nodes.Language)) == NULL ) {
|
||||||
|
free(subject);
|
||||||
|
MacroClear();
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
if ((fp = SendMgrMail(t, CFG.ct_KeepMgr, FALSE, (char *)"Filemgr", subject, replyid)) != NULL) {
|
if ((fp = SendMgrMail(t, CFG.ct_KeepMgr, FALSE, (char *)"Filemgr", subject, replyid)) != NULL) {
|
||||||
if ( (fi=OpenMacro("filemgr.status", nodes.Language)) != NULL ){
|
|
||||||
MacroRead(fi, fp);
|
MacroRead(fi, fp);
|
||||||
MacroClear();
|
MacroClear();
|
||||||
fclose(fi);
|
fclose(fi);
|
||||||
}else{
|
|
||||||
fprintf(fp, "Here is your fileecho status:\r\r");
|
|
||||||
|
|
||||||
fprintf(fp, "Netmail message %s\r", GetBool(nodes.Message));
|
|
||||||
fprintf(fp, "TIC files %s\r", GetBool(nodes.Tic));
|
|
||||||
if (nodes.Tic)
|
|
||||||
fprintf(fp, "Andvanced TIC files %s\r", GetBool(nodes.AdvTic));
|
|
||||||
fprintf(fp, "Notify messages %s\r", GetBool(nodes.Notify));
|
|
||||||
fprintf(fp, "Cost sharing %s\r", GetBool(nodes.Billing));
|
|
||||||
if (nodes.Billing) {
|
|
||||||
fprintf(fp, "Send bill direct %s\r", GetBool(nodes.BillDirect));
|
|
||||||
fprintf(fp, "Units debet %ld\r", nodes.Debet);
|
|
||||||
fprintf(fp, "Units credit %ld\r", nodes.Credit);
|
|
||||||
fprintf(fp, "Warning level %ld\r", nodes.WarnLevel);
|
|
||||||
}
|
|
||||||
|
|
||||||
fprintf(fp, "\r\rRecent flow:\r\r");
|
|
||||||
|
|
||||||
fprintf(fp, " Last week Last month Total ever\r");
|
|
||||||
fprintf(fp, " ---------- ---------- ----------\r");
|
|
||||||
fprintf(fp, "Files sent %-10ld %-10ld %-10ld\r", nodes.FilesSent.lweek,
|
|
||||||
nodes.FilesSent.month[i], nodes.FilesSent.total);
|
|
||||||
fprintf(fp, "KBytes sent %-10ld %-10ld %-10ld\r", nodes.F_KbSent.lweek,
|
|
||||||
nodes.F_KbSent.month[i], nodes.F_KbSent.total);
|
|
||||||
fprintf(fp, "Files received %-10ld %-10ld %-10ld\r", nodes.FilesRcvd.lweek,
|
|
||||||
nodes.FilesRcvd.month[i], nodes.FilesRcvd.total);
|
|
||||||
fprintf(fp, "KBytes received %-10ld %-10ld %-10ld\r", nodes.F_KbRcvd.lweek,
|
|
||||||
nodes.F_KbRcvd.month[i], nodes.F_KbRcvd.total);
|
|
||||||
|
|
||||||
fprintf(fp, "\rWith regards, %s\r\r", CFG.sysop_name);
|
|
||||||
}
|
|
||||||
fprintf(fp, "%s\r", TearLine());
|
fprintf(fp, "%s\r", TearLine());
|
||||||
CloseMail(fp, t);
|
CloseMail(fp, t);
|
||||||
} else
|
} else
|
||||||
@ -463,8 +362,7 @@ void F_Disconnect(faddr *t, char *Area, FILE *tmp)
|
|||||||
if (!SearchTic(Area)) {
|
if (!SearchTic(Area)) {
|
||||||
MacroVars("SsP", "sss", CFG.sysop_name, nodes.Sysop, "Filemgr");
|
MacroVars("SsP", "sss", CFG.sysop_name, nodes.Sysop, "Filemgr");
|
||||||
MacroVars("RABCDE", "ssssss","ERR_DISC_NOTFOUND",Area,"","","","");
|
MacroVars("RABCDE", "ssssss","ERR_DISC_NOTFOUND",Area,"","","","");
|
||||||
if (!MsgResult("filemgr.responses",tmp))
|
MsgResult("filemgr.responses",tmp);
|
||||||
fprintf(tmp, "Area %s not found\n", Area);
|
|
||||||
Syslog('+', " Area not found");
|
Syslog('+', " Area not found");
|
||||||
MacroClear();
|
MacroClear();
|
||||||
return;
|
return;
|
||||||
@ -481,8 +379,7 @@ void F_Disconnect(faddr *t, char *Area, FILE *tmp)
|
|||||||
if (Group == NULL) {
|
if (Group == NULL) {
|
||||||
MacroVars("SsP", "sss", CFG.sysop_name, nodes.Sysop, "Filemgr");
|
MacroVars("SsP", "sss", CFG.sysop_name, nodes.Sysop, "Filemgr");
|
||||||
MacroVars("RABCDE", "ssssss","ERR_DISC_NOTGROUP",Area,"","","","");
|
MacroVars("RABCDE", "ssssss","ERR_DISC_NOTGROUP",Area,"","","","");
|
||||||
if (!MsgResult("filemgr.responses",tmp))
|
MsgResult("filemgr.responses",tmp);
|
||||||
fprintf(tmp, "You may not disconnect from area %s\n", Area);
|
|
||||||
Syslog('+', " Group %s not available for %s", fgroup.Name, ascfnode(t, 0x1f));
|
Syslog('+', " Group %s not available for %s", fgroup.Name, ascfnode(t, 0x1f));
|
||||||
MacroClear();
|
MacroClear();
|
||||||
return;
|
return;
|
||||||
@ -495,8 +392,7 @@ void F_Disconnect(faddr *t, char *Area, FILE *tmp)
|
|||||||
if (i >= METRIC_NET) {
|
if (i >= METRIC_NET) {
|
||||||
MacroVars("SsP", "sss", CFG.sysop_name, nodes.Sysop, "Filemgr");
|
MacroVars("SsP", "sss", CFG.sysop_name, nodes.Sysop, "Filemgr");
|
||||||
MacroVars("RABCDE", "ssssss","ERR_DISC_BADADD",Area,ascfnode(t, 0x1f),"","","");
|
MacroVars("RABCDE", "ssssss","ERR_DISC_BADADD",Area,ascfnode(t, 0x1f),"","","");
|
||||||
if (!MsgResult("filemgr.responses",tmp))
|
MsgResult("filemgr.responses",tmp);
|
||||||
fprintf(tmp, "You may not disconnect area %s with nodenumber %s\n", Area, ascfnode(t, 0x1f));
|
|
||||||
Syslog('+', " %s may not disconnect from group %s", ascfnode(t, 0x1f), fgroup.Name);
|
Syslog('+', " %s may not disconnect from group %s", ascfnode(t, 0x1f), fgroup.Name);
|
||||||
MacroClear();
|
MacroClear();
|
||||||
return;
|
return;
|
||||||
@ -510,8 +406,7 @@ void F_Disconnect(faddr *t, char *Area, FILE *tmp)
|
|||||||
if (!TicSystemConnected(Sys)) {
|
if (!TicSystemConnected(Sys)) {
|
||||||
MacroVars("SsP", "sss", CFG.sysop_name, nodes.Sysop,"Filemgr");
|
MacroVars("SsP", "sss", CFG.sysop_name, nodes.Sysop,"Filemgr");
|
||||||
MacroVars("RABCDE", "ssssss","ERR_DISC_NC",Area,"","","","");
|
MacroVars("RABCDE", "ssssss","ERR_DISC_NC",Area,"","","","");
|
||||||
if (!MsgResult("filemgr.responses",tmp))
|
MsgResult("filemgr.responses",tmp);
|
||||||
fprintf(tmp, "You are not connected to %s\n", Area);
|
|
||||||
Syslog('+', " %s is not connected to %s", ascfnode(t, 0x1f), Area);
|
Syslog('+', " %s is not connected to %s", ascfnode(t, 0x1f), Area);
|
||||||
MacroClear();
|
MacroClear();
|
||||||
return;
|
return;
|
||||||
@ -526,21 +421,20 @@ void F_Disconnect(faddr *t, char *Area, FILE *tmp)
|
|||||||
Syslog('+', "Disconnected file area %s", Area);
|
Syslog('+', "Disconnected file area %s", Area);
|
||||||
MacroVars("SsP", "sss", CFG.sysop_name, nodes.Sysop,"Filemgr");
|
MacroVars("SsP", "sss", CFG.sysop_name, nodes.Sysop,"Filemgr");
|
||||||
MacroVars("RABCDE", "ssssss","OK_DISC",Area,"","","","");
|
MacroVars("RABCDE", "ssssss","OK_DISC",Area,"","","","");
|
||||||
if (!MsgResult("filemgr.responses",tmp))
|
MsgResult("filemgr.responses",tmp);
|
||||||
fprintf(tmp, "Disconnected from area %s\n", Area);
|
|
||||||
MacroClear();
|
MacroClear();
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
MacroVars("SsP", "sss", CFG.sysop_name, nodes.Sysop,"Filemgr");
|
MacroVars("SsP", "sss", CFG.sysop_name, nodes.Sysop,"Filemgr");
|
||||||
MacroVars("RABCDE", "ssssss","ERR_DISC_NOTAVAIL",Area,"","","","");
|
MacroVars("RABCDE", "ssssss","ERR_DISC_NOTAVAIL",Area,"","","","");
|
||||||
if (!MsgResult("filemgr.responses",tmp))
|
MsgResult("filemgr.responses",tmp);
|
||||||
fprintf(tmp, "You may not disconnect area %s, area is mandatory\n", Area);
|
|
||||||
Syslog('+', "Didn't disconnect %s from mandatory file area %s", ascfnode(t, 0x1f), Area);
|
Syslog('+', "Didn't disconnect %s from mandatory file area %s", ascfnode(t, 0x1f), Area);
|
||||||
MacroClear();
|
MacroClear();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
void F_Connect(faddr *, char *, FILE *);
|
void F_Connect(faddr *, char *, FILE *);
|
||||||
void F_Connect(faddr *t, char *Area, FILE *tmp)
|
void F_Connect(faddr *t, char *Area, FILE *tmp)
|
||||||
{
|
{
|
||||||
@ -559,8 +453,7 @@ void F_Connect(faddr *t, char *Area, FILE *tmp)
|
|||||||
if (!SearchTic(Area)) {
|
if (!SearchTic(Area)) {
|
||||||
MacroVars("SsP", "sss", CFG.sysop_name, nodes.Sysop, "Filemgr");
|
MacroVars("SsP", "sss", CFG.sysop_name, nodes.Sysop, "Filemgr");
|
||||||
MacroVars("RABCDE", "ssssss","ERR_CONN_NOTFOUND",Area,"","","","");
|
MacroVars("RABCDE", "ssssss","ERR_CONN_NOTFOUND",Area,"","","","");
|
||||||
if (!MsgResult("filemgr.responses",tmp))
|
MsgResult("filemgr.responses",tmp);
|
||||||
fprintf(tmp, "Area %s not found\n", Area);
|
|
||||||
Syslog('m', " Area not found");
|
Syslog('m', " Area not found");
|
||||||
/* SHOULD CHECK FOR AREAS FILE AND ASK UPLINK
|
/* SHOULD CHECK FOR AREAS FILE AND ASK UPLINK
|
||||||
CHECK ALL GROUPRECORDS FOR AKA MATCH
|
CHECK ALL GROUPRECORDS FOR AKA MATCH
|
||||||
@ -584,8 +477,7 @@ void F_Connect(faddr *t, char *Area, FILE *tmp)
|
|||||||
if (Group == NULL) {
|
if (Group == NULL) {
|
||||||
MacroVars("SsP", "sss", CFG.sysop_name, nodes.Sysop, "Filemgr");
|
MacroVars("SsP", "sss", CFG.sysop_name, nodes.Sysop, "Filemgr");
|
||||||
MacroVars("RABCDE", "ssssss","ERR_CONN_NOTGROUP",Area,"","","","");
|
MacroVars("RABCDE", "ssssss","ERR_CONN_NOTGROUP",Area,"","","","");
|
||||||
if (!MsgResult("filemgr.responses",tmp))
|
MsgResult("filemgr.responses",tmp);
|
||||||
fprintf(tmp, "You may not connect to area %s\n", Area);
|
|
||||||
Syslog('+', " Group %s not available for %s", fgroup.Name, ascfnode(t, 0x1f));
|
Syslog('+', " Group %s not available for %s", fgroup.Name, ascfnode(t, 0x1f));
|
||||||
MacroClear();
|
MacroClear();
|
||||||
return;
|
return;
|
||||||
@ -598,8 +490,7 @@ void F_Connect(faddr *t, char *Area, FILE *tmp)
|
|||||||
if (i >= METRIC_NET) {
|
if (i >= METRIC_NET) {
|
||||||
MacroVars("SsP", "sss", CFG.sysop_name, nodes.Sysop,"Filemgr");
|
MacroVars("SsP", "sss", CFG.sysop_name, nodes.Sysop,"Filemgr");
|
||||||
MacroVars("RABCDE", "ssssss","ERR_CONN_BADADD",Area,ascfnode(t, 0x1f),"","","");
|
MacroVars("RABCDE", "ssssss","ERR_CONN_BADADD",Area,ascfnode(t, 0x1f),"","","");
|
||||||
if (!MsgResult("filemgr.responses",tmp))
|
MsgResult("filemgr.responses",tmp);
|
||||||
fprintf(tmp, "You may not connect area %s with nodenumber %s\n", Area, ascfnode(t, 0x1f));
|
|
||||||
Syslog('+', " Node %s may not connect to group %s", ascfnode(t, 0x1f), fgroup.Name);
|
Syslog('+', " Node %s may not connect to group %s", ascfnode(t, 0x1f), fgroup.Name);
|
||||||
MacroClear();
|
MacroClear();
|
||||||
return;
|
return;
|
||||||
@ -612,8 +503,7 @@ void F_Connect(faddr *t, char *Area, FILE *tmp)
|
|||||||
if (TicSystemConnected(Sys)) {
|
if (TicSystemConnected(Sys)) {
|
||||||
MacroVars("SsP", "sss", CFG.sysop_name, nodes.Sysop,"Filemgr");
|
MacroVars("SsP", "sss", CFG.sysop_name, nodes.Sysop,"Filemgr");
|
||||||
MacroVars("RABCDE", "ssssss","ERR_CONN_ALREADY",Area,"","","","");
|
MacroVars("RABCDE", "ssssss","ERR_CONN_ALREADY",Area,"","","","");
|
||||||
if (!MsgResult("filemgr.responses",tmp))
|
MsgResult("filemgr.responses",tmp);
|
||||||
fprintf(tmp, "You are already connected to %s\n", Area);
|
|
||||||
Syslog('+', " %s is already connected to %s", ascfnode(t, 0x1f), Area);
|
Syslog('+', " %s is already connected to %s", ascfnode(t, 0x1f), Area);
|
||||||
MacroClear();
|
MacroClear();
|
||||||
return;
|
return;
|
||||||
@ -628,15 +518,13 @@ void F_Connect(faddr *t, char *Area, FILE *tmp)
|
|||||||
Syslog('+', "Connected to file area %s", Area);
|
Syslog('+', "Connected to file area %s", Area);
|
||||||
MacroVars("SsP", "sss", CFG.sysop_name, nodes.Sysop,"Filemgr");
|
MacroVars("SsP", "sss", CFG.sysop_name, nodes.Sysop,"Filemgr");
|
||||||
MacroVars("RABCDE", "ssssss","OK_CONN",Area,aka2str(tic.Aka),"","","");
|
MacroVars("RABCDE", "ssssss","OK_CONN",Area,aka2str(tic.Aka),"","","");
|
||||||
if (!MsgResult("filemgr.responses",tmp))
|
MsgResult("filemgr.responses",tmp);
|
||||||
fprintf(tmp, "Connected to area %s using aka %s\n", Area, aka2str(tic.Aka));
|
|
||||||
MacroClear();
|
MacroClear();
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
MacroVars("SsP", "sss", CFG.sysop_name, nodes.Sysop,"Filemgr");
|
MacroVars("SsP", "sss", CFG.sysop_name, nodes.Sysop,"Filemgr");
|
||||||
MacroVars("RABCDE", "ssssss","ERR_CONN_NOTAVAIL",Area,"","","","");
|
MacroVars("RABCDE", "ssssss","ERR_CONN_NOTAVAIL",Area,"","","","");
|
||||||
if (!MsgResult("filemgr.responses",tmp))
|
MsgResult("filemgr.responses",tmp);
|
||||||
fprintf(tmp, "Not connected to %s, internal error, sysop is notified\n", Area);
|
|
||||||
WriteError("Can't connect node %s to file area %s", ascfnode(t, 0x1f), Area);
|
WriteError("Can't connect node %s to file area %s", ascfnode(t, 0x1f), Area);
|
||||||
MacroClear();
|
MacroClear();
|
||||||
}
|
}
|
||||||
@ -723,8 +611,7 @@ void F_All(faddr *t, int Connect, FILE *tmp, char *Grp)
|
|||||||
Syslog('+', "FileMgr: Connected %s", tic.Name);
|
Syslog('+', "FileMgr: Connected %s", tic.Name);
|
||||||
MacroVars("SsP", "sss", CFG.sysop_name, nodes.Sysop,"Filemgr");
|
MacroVars("SsP", "sss", CFG.sysop_name, nodes.Sysop,"Filemgr");
|
||||||
MacroVars("RABCDE", "ssssss","OK_CONN",tic.Name,aka2str(tic.Aka),"","","");
|
MacroVars("RABCDE", "ssssss","OK_CONN",tic.Name,aka2str(tic.Aka),"","","");
|
||||||
if (!MsgResult("filemgr.responses",tmp))
|
MsgResult("filemgr.responses",tmp);
|
||||||
fprintf(tmp, "Connected area %s using aka %s\n", tic.Name, aka2str(tic.Aka));
|
|
||||||
MacroClear();
|
MacroClear();
|
||||||
f_list = TRUE;
|
f_list = TRUE;
|
||||||
break;
|
break;
|
||||||
@ -742,8 +629,7 @@ void F_All(faddr *t, int Connect, FILE *tmp, char *Grp)
|
|||||||
Syslog('+', "FileMgr: Disconnected %s", tic.Name);
|
Syslog('+', "FileMgr: Disconnected %s", tic.Name);
|
||||||
MacroVars("SsP", "sss", CFG.sysop_name, nodes.Sysop,"Filemgr");
|
MacroVars("SsP", "sss", CFG.sysop_name, nodes.Sysop,"Filemgr");
|
||||||
MacroVars("RABCDE", "ssssss","OK_DISC",tic.Name,"","","","");
|
MacroVars("RABCDE", "ssssss","OK_DISC",tic.Name,"","","","");
|
||||||
if (!MsgResult("filemgr.responses",tmp))
|
MsgResult("filemgr.responses",tmp);
|
||||||
fprintf(tmp, "Disconnected area %s\n", tic.Name);
|
|
||||||
MacroClear();
|
MacroClear();
|
||||||
f_list = TRUE;
|
f_list = TRUE;
|
||||||
}
|
}
|
||||||
@ -811,7 +697,9 @@ void F_Pause(faddr *t, int Pause, FILE *tmp)
|
|||||||
fseek(fp, - sizeof(Sys), SEEK_CUR);
|
fseek(fp, - sizeof(Sys), SEEK_CUR);
|
||||||
fwrite(&Sys, sizeof(Sys), 1, fp);
|
fwrite(&Sys, sizeof(Sys), 1, fp);
|
||||||
Syslog('+', "FileMgr: %s area %s", Pause?"Pause":"Resume", tic.Name);
|
Syslog('+', "FileMgr: %s area %s", Pause?"Pause":"Resume", tic.Name);
|
||||||
fprintf(tmp, "%s area %s\n", Pause?"Pause":"Resume", tic.Name);
|
MacroVars("SsP", "sss", CFG.sysop_name, nodes.Sysop,"FileMgr");
|
||||||
|
MacroVars("RABCDE", "ssssss","OK_PAUSE",tic.Name,ascfnode(t, 0x1f),"","");
|
||||||
|
MsgResult("filemgr.responses",tmp);
|
||||||
f_list = TRUE;
|
f_list = TRUE;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -838,11 +726,10 @@ void F_Message(faddr *t, char *Buf, FILE *tmp)
|
|||||||
|
|
||||||
UpdateNode();
|
UpdateNode();
|
||||||
SearchNodeFaddr(t);
|
SearchNodeFaddr(t);
|
||||||
Syslog('+', "FileMgr: Message %s", GetBool(nodes.Message));
|
Syslog('+', "FileMgr: Message %s", nodes.Message?"Yes":"No");
|
||||||
MacroVars("SsP", "sss", CFG.sysop_name, nodes.Sysop,"Filemgr");
|
MacroVars("SsP", "sss", CFG.sysop_name, nodes.Sysop,"Filemgr");
|
||||||
MacroVars("RABCDE", "sdssss","OK_MESSAGE",nodes.Message,"","","","");
|
MacroVars("RABCDE", "sdssss","OK_MESSAGE",nodes.Message,"","","","");
|
||||||
if (!MsgResult("filemgr.responses",tmp))
|
MsgResult("filemgr.responses",tmp);
|
||||||
fprintf(tmp, "FileMgr Message file is %s\n", GetBool(nodes.Message));
|
|
||||||
MacroClear();
|
MacroClear();
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -865,27 +752,26 @@ void F_Tick(faddr *t, char *Buf, FILE *tmp)
|
|||||||
|
|
||||||
UpdateNode();
|
UpdateNode();
|
||||||
SearchNodeFaddr(t);
|
SearchNodeFaddr(t);
|
||||||
Syslog('+', "FileMgr: Tick %s, Advanced %s", GetBool(nodes.Tic), GetBool(nodes.AdvTic));
|
Syslog('+', "FileMgr: Tick %s, Advanced %s", nodes.Tic?"Yes":"No", nodes.AdvTic?"Yes":"No");
|
||||||
if (nodes.Tic)
|
if (nodes.Tic)
|
||||||
if (nodes.AdvTic){
|
if (nodes.AdvTic){
|
||||||
MacroVars("SsP", "sss", CFG.sysop_name, nodes.Sysop,"Filemgr");
|
MacroVars("SsP", "sss", CFG.sysop_name, nodes.Sysop,"Filemgr");
|
||||||
MacroVars("RABCDE", "sddsss","OK_TIC_ADV",nodes.Tic,nodes.AdvTic,"","","");
|
MacroVars("RABCDE", "sddsss","OK_TIC_ADV",nodes.Tic,nodes.AdvTic,"","","");
|
||||||
if (!MsgResult("filemgr.responses",tmp))
|
MsgResult("filemgr.responses",tmp);
|
||||||
fprintf(tmp, "Tick mode is advanced\n");
|
|
||||||
}else{
|
}else{
|
||||||
MacroVars("SsP", "sss", CFG.sysop_name, nodes.Sysop,"Filemgr");
|
MacroVars("SsP", "sss", CFG.sysop_name, nodes.Sysop,"Filemgr");
|
||||||
MacroVars("RABCDE", "sddsss","OK_TIC_NORM",nodes.Tic,nodes.AdvTic,"","","");
|
MacroVars("RABCDE", "sddsss","OK_TIC_NORM",nodes.Tic,nodes.AdvTic,"","","");
|
||||||
if (!MsgResult("filemgr.responses",tmp))
|
MsgResult("filemgr.responses",tmp);
|
||||||
fprintf(tmp, "Tick mode is normal\n");
|
|
||||||
}else{
|
}else{
|
||||||
MacroVars("SsP", "sss", CFG.sysop_name, nodes.Sysop,"Filemgr");
|
MacroVars("SsP", "sss", CFG.sysop_name, nodes.Sysop,"Filemgr");
|
||||||
MacroVars("RABCDE", "sddsss","OK_TIC_OFF",nodes.Tic,nodes.AdvTic,"","","");
|
MacroVars("RABCDE", "sddsss","OK_TIC_OFF",nodes.Tic,nodes.AdvTic,"","","");
|
||||||
if (!MsgResult("filemgr.responses",tmp))
|
MsgResult("filemgr.responses",tmp);
|
||||||
fprintf(tmp, "Tick mode is off\n");
|
|
||||||
}
|
}
|
||||||
MacroClear();
|
MacroClear();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
int FileMgr(faddr *f, faddr *t, char *replyid, char *subj, time_t mdate, int flags, FILE *fp)
|
int FileMgr(faddr *f, faddr *t, char *replyid, char *subj, time_t mdate, int flags, FILE *fp)
|
||||||
{
|
{
|
||||||
int i, rc = 0, spaces;
|
int i, rc = 0, spaces;
|
||||||
@ -1000,10 +886,7 @@ int FileMgr(faddr *f, faddr *t, char *replyid, char *subj, time_t mdate, int fla
|
|||||||
GetRpSubject("filemgr.responses",subject);
|
GetRpSubject("filemgr.responses",subject);
|
||||||
if ((np = SendMgrMail(f, CFG.ct_KeepMgr, FALSE, (char *)"Filemgr", subject, replyid)) != NULL) {
|
if ((np = SendMgrMail(f, CFG.ct_KeepMgr, FALSE, (char *)"Filemgr", subject, replyid)) != NULL) {
|
||||||
MacroVars("RABCDE", "ssssss","WELLCOME","","","","","");
|
MacroVars("RABCDE", "ssssss","WELLCOME","","","","","");
|
||||||
if (!MsgResult("filemgr.responses",np)){
|
MsgResult("filemgr.responses",np);
|
||||||
fprintf(np, " Dear %s\r\r", nodes.Sysop);
|
|
||||||
fprintf(np, "Here is the result of your FileMgr request:\r\r");
|
|
||||||
}
|
|
||||||
fseek(tmp, 0, SEEK_SET);
|
fseek(tmp, 0, SEEK_SET);
|
||||||
|
|
||||||
while ((fgets(Buf, 2048, tmp)) != NULL) {
|
while ((fgets(Buf, 2048, tmp)) != NULL) {
|
||||||
@ -1015,8 +898,7 @@ int FileMgr(faddr *f, faddr *t, char *replyid, char *subj, time_t mdate, int fla
|
|||||||
}
|
}
|
||||||
|
|
||||||
MacroVars("RABCDE", "ssssss","GOODBYE","","","","","");
|
MacroVars("RABCDE", "ssssss","GOODBYE","","","","","");
|
||||||
if (!MsgResult("filemgr.responses",np))
|
MsgResult("filemgr.responses",np);
|
||||||
fprintf(np, "\rWith regards, %s\r\r", CFG.sysop_name);
|
|
||||||
fprintf(np, "%s\r", TearLine());
|
fprintf(np, "%s\r", TearLine());
|
||||||
CloseMail(np, t);
|
CloseMail(np, t);
|
||||||
} else
|
} else
|
||||||
|
@ -93,27 +93,23 @@ void WriteMailGroups(FILE *fp, faddr *f)
|
|||||||
faddr *g;
|
faddr *g;
|
||||||
fpos_t fileptr;
|
fpos_t fileptr;
|
||||||
|
|
||||||
|
if ((fi = OpenMacro("areamgr.group", nodes.Language)) == NULL)
|
||||||
|
return;
|
||||||
|
|
||||||
|
MacroRead(fi, fp);
|
||||||
|
fgetpos(fi,&fileptr);
|
||||||
|
|
||||||
temp = calloc(PATH_MAX, sizeof(char));
|
temp = calloc(PATH_MAX, sizeof(char));
|
||||||
sprintf(temp, "%s/etc/mgroups.data", getenv("MBSE_ROOT"));
|
sprintf(temp, "%s/etc/mgroups.data", getenv("MBSE_ROOT"));
|
||||||
|
|
||||||
if ((fi = OpenMacro("areamgr.group", nodes.Language)) != NULL){
|
|
||||||
MacroRead(fi, fp);
|
|
||||||
fgetpos(fi,&fileptr);
|
|
||||||
} else {
|
|
||||||
fprintf(fp, "Dear %s\r\r", nodes.Sysop);
|
|
||||||
fprintf(fp, "The following is a list of mail groups at %s\r\r", ascfnode(f, 0x1f));
|
|
||||||
}
|
|
||||||
if ((gp = fopen(temp, "r")) == NULL) {
|
if ((gp = fopen(temp, "r")) == NULL) {
|
||||||
WriteError("$Can't open %s", temp);
|
WriteError("$Can't open %s", temp);
|
||||||
free(temp);
|
free(temp);
|
||||||
|
fclose(fi);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
fread(&mgrouphdr, sizeof(mgrouphdr), 1, gp);
|
fread(&mgrouphdr, sizeof(mgrouphdr), 1, gp);
|
||||||
|
|
||||||
if (fi == NULL){
|
|
||||||
fprintf(fp, "Group Description\r");
|
|
||||||
fprintf(fp, "--------------------------------------------------------------------\r");
|
|
||||||
}
|
|
||||||
while (TRUE) {
|
while (TRUE) {
|
||||||
Group = GetNodeMailGrp(First);
|
Group = GetNodeMailGrp(First);
|
||||||
if (Group == NULL)
|
if (Group == NULL)
|
||||||
@ -124,28 +120,19 @@ void WriteMailGroups(FILE *fp, faddr *f)
|
|||||||
while (fread(&mgroup, mgrouphdr.recsize, 1, gp) == 1) {
|
while (fread(&mgroup, mgrouphdr.recsize, 1, gp) == 1) {
|
||||||
g = bestaka_s(fido2faddr(mgroup.UseAka));
|
g = bestaka_s(fido2faddr(mgroup.UseAka));
|
||||||
if ((!strcmp(mgroup.Name, Group)) &&
|
if ((!strcmp(mgroup.Name, Group)) &&
|
||||||
(g->zone == f->zone) && (g->net == f->net) &&
|
(g->zone == f->zone) && (g->net == f->net) && (g->node == f->node) && (g->point == f->point)) {
|
||||||
(g->node == f->node) && (g->point == f->point)) {
|
|
||||||
if (fi !=NULL){
|
|
||||||
MacroVars("gh", "ss", mgroup.Name, mgroup.Comment);
|
MacroVars("gh", "ss", mgroup.Name, mgroup.Comment);
|
||||||
fsetpos(fi, &fileptr);
|
fsetpos(fi, &fileptr);
|
||||||
MacroRead(fi, fp);
|
MacroRead(fi, fp);
|
||||||
}else{
|
|
||||||
fprintf(fp, "%-12s %s\r", mgroup.Name, mgroup.Comment);
|
|
||||||
}
|
|
||||||
Count++;
|
Count++;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (fi != NULL){
|
|
||||||
MacroVars("b", "d", Count);
|
MacroVars("b", "d", Count);
|
||||||
MacroRead(fi, fp);
|
MacroRead(fi, fp);
|
||||||
fclose(fi);
|
fclose(fi);
|
||||||
}else{
|
|
||||||
fprintf(fp, "--------------------------------------------------------------------\r");
|
|
||||||
fprintf(fp, "%d group(s)\r\r\r", Count);
|
|
||||||
}
|
|
||||||
fclose(gp);
|
fclose(gp);
|
||||||
free(temp);
|
free(temp);
|
||||||
}
|
}
|
||||||
@ -163,27 +150,23 @@ void WriteFileGroups(FILE *fp, faddr *f)
|
|||||||
faddr *g;
|
faddr *g;
|
||||||
fpos_t fileptr;
|
fpos_t fileptr;
|
||||||
|
|
||||||
|
if ((fi = OpenMacro("filemgr.group", nodes.Language)) == NULL)
|
||||||
|
return;
|
||||||
|
|
||||||
|
MacroRead(fi, fp);
|
||||||
|
fgetpos(fi,&fileptr);
|
||||||
|
|
||||||
temp = calloc(128, sizeof(char));
|
temp = calloc(128, sizeof(char));
|
||||||
sprintf(temp, "%s/etc/fgroups.data", getenv("MBSE_ROOT"));
|
sprintf(temp, "%s/etc/fgroups.data", getenv("MBSE_ROOT"));
|
||||||
|
|
||||||
if ((fi = OpenMacro("filemgr.group", nodes.Language)) != NULL){
|
|
||||||
MacroRead(fi, fp);
|
|
||||||
fgetpos(fi,&fileptr);
|
|
||||||
}else{
|
|
||||||
fprintf(fp, "Dear %s\r\r", nodes.Sysop);
|
|
||||||
fprintf(fp, "The following is a list of file groups at %s\r\r", ascfnode(f, 0x1f));
|
|
||||||
}
|
|
||||||
if ((gp = fopen(temp, "r")) == NULL) {
|
if ((gp = fopen(temp, "r")) == NULL) {
|
||||||
WriteError("$Can't open %s", temp);
|
WriteError("$Can't open %s", temp);
|
||||||
free(temp);
|
free(temp);
|
||||||
|
fclose(fi);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
fread(&fgrouphdr, sizeof(fgrouphdr), 1, gp);
|
fread(&fgrouphdr, sizeof(fgrouphdr), 1, gp);
|
||||||
|
|
||||||
if (fi == NULL){
|
|
||||||
fprintf(fp, "Group Description\r");
|
|
||||||
fprintf(fp, "--------------------------------------------------------------------\r");
|
|
||||||
}
|
|
||||||
while (TRUE) {
|
while (TRUE) {
|
||||||
Group = GetNodeFileGrp(First);
|
Group = GetNodeFileGrp(First);
|
||||||
if (Group == NULL)
|
if (Group == NULL)
|
||||||
@ -194,44 +177,25 @@ void WriteFileGroups(FILE *fp, faddr *f)
|
|||||||
while (fread(&fgroup, fgrouphdr.recsize, 1, gp) == 1) {
|
while (fread(&fgroup, fgrouphdr.recsize, 1, gp) == 1) {
|
||||||
g = bestaka_s(fido2faddr(fgroup.UseAka));
|
g = bestaka_s(fido2faddr(fgroup.UseAka));
|
||||||
if ((!strcmp(fgroup.Name, Group)) &&
|
if ((!strcmp(fgroup.Name, Group)) &&
|
||||||
(g->zone == f->zone) && (g->net == f->net) &&
|
(g->zone == f->zone) && (g->net == f->net) && (g->node == f->node) && (g->point == f->point)) {
|
||||||
(g->node == f->node) && (g->point == f->point)) {
|
|
||||||
if (fi !=NULL){
|
|
||||||
MacroVars("gh", "ss", fgroup.Name, fgroup.Comment );
|
MacroVars("gh", "ss", fgroup.Name, fgroup.Comment );
|
||||||
fsetpos(fi,&fileptr);
|
fsetpos(fi,&fileptr);
|
||||||
MacroRead(fi, fp);
|
MacroRead(fi, fp);
|
||||||
}else{
|
|
||||||
fprintf(fp, "%-12s %s\r", fgroup.Name, fgroup.Comment);
|
|
||||||
}
|
|
||||||
Count++;
|
Count++;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (fi != NULL){
|
|
||||||
MacroVars("b", "d", Count );
|
MacroVars("b", "d", Count );
|
||||||
MacroRead(fi, fp);
|
MacroRead(fi, fp);
|
||||||
fclose(fi);
|
fclose(fi);
|
||||||
}else{
|
|
||||||
fprintf(fp, "--------------------------------------------------------------------\r");
|
|
||||||
fprintf(fp, "%d group(s)\r\r\r", Count);
|
|
||||||
}
|
|
||||||
fclose(gp);
|
fclose(gp);
|
||||||
free(temp);
|
free(temp);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
char *GetBool(int Flag)
|
|
||||||
{
|
|
||||||
if (Flag)
|
|
||||||
return (char *)"Yes";
|
|
||||||
else
|
|
||||||
return (char *)"No";
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Shift all characters in Buf Cnt places to left
|
* Shift all characters in Buf Cnt places to left
|
||||||
*/
|
*/
|
||||||
@ -267,8 +231,7 @@ void MgrPasswd(faddr *t, char *Buf, FILE *tmp, int Len, int mgr)
|
|||||||
MacroVars("SsP", "sss", CFG.sysop_name, nodes.Sysop, mgr?(char *)"Filemgr":(char *)"Areamgr");
|
MacroVars("SsP", "sss", CFG.sysop_name, nodes.Sysop, mgr?(char *)"Filemgr":(char *)"Areamgr");
|
||||||
if ((strlen(Buf) < 3) || (strlen(Buf) > 15)) {
|
if ((strlen(Buf) < 3) || (strlen(Buf) > 15)) {
|
||||||
MacroVars("RABCDE", "ssssss",(char *)"ERR_PASS_LEN",(char *)"",(char *)"",(char *)"",(char *)"",(char *)"");
|
MacroVars("RABCDE", "ssssss",(char *)"ERR_PASS_LEN",(char *)"",(char *)"",(char *)"",(char *)"",(char *)"");
|
||||||
if (!MsgResult(mgr?"filemgr.responses":"areamgr.responses",tmp))
|
MsgResult(mgr?"filemgr.responses":"areamgr.responses",tmp);
|
||||||
fprintf(tmp, "A new password must be between 3 and 15 characters in length\n");
|
|
||||||
Syslog('+', "XxxxMgr: Password length %d, not changed", strlen(Buf));
|
Syslog('+', "XxxxMgr: Password length %d, not changed", strlen(Buf));
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@ -276,8 +239,7 @@ void MgrPasswd(faddr *t, char *Buf, FILE *tmp, int Len, int mgr)
|
|||||||
memset(&nodes.Apasswd, 0, sizeof(nodes.Apasswd));
|
memset(&nodes.Apasswd, 0, sizeof(nodes.Apasswd));
|
||||||
strncpy(nodes.Apasswd, tu(Buf), 15);
|
strncpy(nodes.Apasswd, tu(Buf), 15);
|
||||||
MacroVars("RABCDE", "ssssss",(char *)"OK_PASS",nodes.Apasswd,(char *)"",(char *)"",(char *)"",(char *)"");
|
MacroVars("RABCDE", "ssssss",(char *)"OK_PASS",nodes.Apasswd,(char *)"",(char *)"",(char *)"",(char *)"");
|
||||||
if (!MsgResult(mgr?"filemgr.responses":"areamgr.responses",tmp))
|
MsgResult(mgr?"filemgr.responses":"areamgr.responses",tmp);
|
||||||
fprintf(tmp, "AreaMgr and FileMgr password is now \"%s\"\n", nodes.Apasswd);
|
|
||||||
Syslog('+', "XxxxMgr: Password \"%s\" for node %s", nodes.Apasswd, ascfnode(t, 0x1f));
|
Syslog('+', "XxxxMgr: Password \"%s\" for node %s", nodes.Apasswd, ascfnode(t, 0x1f));
|
||||||
MacroClear();
|
MacroClear();
|
||||||
UpdateNode();
|
UpdateNode();
|
||||||
@ -306,11 +268,10 @@ void MgrNotify(faddr *t, char *Buf, FILE *tmp, int mgr)
|
|||||||
|
|
||||||
UpdateNode();
|
UpdateNode();
|
||||||
SearchNodeFaddr(t);
|
SearchNodeFaddr(t);
|
||||||
Syslog('+', "XxxxMgr: Notify %s", GetBool(nodes.Notify));
|
Syslog('+', "XxxxMgr: Notify %s", nodes.Notify?"Yes":"No");
|
||||||
MacroVars("SsP", "sss", CFG.sysop_name, nodes.Sysop,mgr?(char *)"Filemgr":(char *)"Areamgr");
|
MacroVars("SsP", "sss", CFG.sysop_name, nodes.Sysop,mgr?(char *)"Filemgr":(char *)"Areamgr");
|
||||||
MacroVars("RABCDE", "ssssss",(char *)"OK_PASS",nodes.Apasswd,(char *)"",(char *)"",(char *)"",(char *)"");
|
MacroVars("RABCDE", "ssssss",(char *)"OK_PASS",nodes.Apasswd,(char *)"",(char *)"",(char *)"",(char *)"");
|
||||||
if (!MsgResult(mgr?"filemgr.responses":"areamgr.responses",tmp))
|
MsgResult(mgr?"filemgr.responses":"areamgr.responses",tmp);
|
||||||
fprintf(tmp, "AreaMgr and FileMgr Notify is %s\n", GetBool(nodes.Notify));
|
|
||||||
MacroClear();
|
MacroClear();
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -486,6 +447,7 @@ int MsgResult(const char * report, FILE *fo)
|
|||||||
} else {
|
} else {
|
||||||
res = 0;
|
res = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
free(temp);
|
free(temp);
|
||||||
return res;
|
return res;
|
||||||
}
|
}
|
||||||
|
@ -10,7 +10,6 @@ void GetRpSubject(const char *, char*);
|
|||||||
|
|
||||||
void WriteMailGroups(FILE *, faddr *);
|
void WriteMailGroups(FILE *, faddr *);
|
||||||
void WriteFileGroups(FILE *, faddr *);
|
void WriteFileGroups(FILE *, faddr *);
|
||||||
char *GetBool(int);
|
|
||||||
void CleanBuf(char *);
|
void CleanBuf(char *);
|
||||||
void ShiftBuf(char *, int);
|
void ShiftBuf(char *, int);
|
||||||
void MgrPasswd(faddr *, char *, FILE *, int, int);
|
void MgrPasswd(faddr *, char *, FILE *, int, int);
|
||||||
|
@ -43,7 +43,6 @@
|
|||||||
#include "../lib/dbuser.h"
|
#include "../lib/dbuser.h"
|
||||||
#include "../lib/dbftn.h"
|
#include "../lib/dbftn.h"
|
||||||
#include "sendmail.h"
|
#include "sendmail.h"
|
||||||
#include "mgrutil.h"
|
|
||||||
#include "postnetmail.h"
|
#include "postnetmail.h"
|
||||||
#include "ping.h"
|
#include "ping.h"
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user