--- sbbs/sbbs2/echo/echocfg.c 2018/04/24 16:37:52 1.1.1.1 +++ sbbs/sbbs2/echo/echocfg.c 2018/04/24 16:39:06 1.1.1.2 @@ -1,1127 +1,1127 @@ -/* ECHOCFG.C */ - -/* Developed 1990-1997 by Rob Swindell; PO Box 501, Yorba Linda, CA 92885 */ - -/* Portions written by Allen Christiansen 1994-1996 */ - -#include -#include -#include "gen_defs.h" -#include "sbbsdefs.h" -#include "sbbsecho.h" - -char **opt; - -void bail(int code); -void main(); -char fexist(char *filespec); -char *faddrtoa(faddr_t addr); - -uchar node_swap=1; -long misc=0; -config_t cfg; - -unsigned _stklen=16000; - -void bail(int code) -{ - -if(code) - getch(); -uifcbail(); -exit(code); -} - -#define lprintf cprintf - -void main(int argc, char **argv) -{ - char str[256],*p; - int i,j,k,x,file,dflt,nodeop=0; - FILE *stream; - echolist_t savlistcfg; - nodecfg_t savnodecfg; - arcdef_t savarcdef; - -fprintf(stderr,"\nSBBSecho Configuration Version %s Developed 1995-1997 " - "Rob Swindell\n\n",SBBSECHO_VER); - -memset(&cfg,0,sizeof(config_t)); -if(argc>1) - strcpy(str,argv[1]); -else { - p=getenv("SBBSCTRL"); - if(!p) { - p=getenv("SBBSNODE"); - if(!p) { - printf("usage: echocfg [cfg_file]\n"); - exit(1); } - strcpy(str,p); - if(str[strlen(str)-1]!='\\') - strcat(str,"\\"); - strcat(str,"..\\CTRL\\SBBSECHO.CFG"); } - else { - strcpy(str,p); - if(str[strlen(str)-1]!='\\') - strcat(str,"\\"); - strcat(str,"SBBSECHO.CFG"); } } -strcpy(cfg.cfgfile,str); -strupr(cfg.cfgfile); - -read_cfg(); - -savnum=0; -if((opt=(char **)MALLOC(sizeof(char *)*300))==NULL) { - cputs("memory allocation error\r\n"); - bail(1); } -for(i=0;i<300;i++) - if((opt[i]=(char *)MALLOC(MAX_OPLN))==NULL) { - cputs("memory allocation error\r\n"); - bail(1); } -uifcini(); -sprintf(str,"SBBSecho Configuration v%s",SBBSECHO_VER); -uscrn(str); - -dflt=0; -while(1) { - helpbuf= -" SBBSecho Configuration \r\n\r\n" -"Move through the various options using the arrow keys. Select the\r\n" -"highlighted options by pressing ENTER.\r\n\r\n"; - i=0; - sprintf(opt[i++],"%-30.30s %s","Mailer Type" - ,misc&FLO_MAILER ? "Binkley/FLO":"FrontDoor/Attach"); - sprintf(opt[i++],"%-30.30s %luK","Maximum Packet Size" - ,cfg.maxpktsize/1024UL); - sprintf(opt[i++],"%-30.30s %luK","Maximum Bundle Size" - ,cfg.maxbdlsize/1024UL); - if(cfg.notify) - sprintf(str,"User #%u",cfg.notify); - else - strcpy(str,"Disabled"); - sprintf(opt[i++],"%-30.30s %s","Areafix Failure Notification",str); - sprintf(opt[i++],"Nodes..."); - sprintf(opt[i++],"Paths..."); - sprintf(opt[i++],"Log Options..."); - sprintf(opt[i++],"Toggle Options..."); - sprintf(opt[i++],"Archive Programs..."); - sprintf(opt[i++],"Additional Echo Lists..."); - opt[i][0]=NULL; - switch(ulist(WIN_ORG|WIN_MID|WIN_ACT|WIN_ESC,0,0,52,&dflt,0 - ,cfg.cfgfile,opt)) { - - case 0: - misc^=FLO_MAILER; - break; - - case 1: -helpbuf= -" Maximum Packet Size \r\n\r\n" -"This is the maximum file size that SBBSecho will create when placing\r\n" -"outgoing messages into packets. The default size is 250k.\r\n"; - sprintf(str,"%lu",cfg.maxpktsize); - uinput(WIN_MID|WIN_BOT,0,0,"Maximum Packet Size",str - ,9,K_EDIT|K_NUMBER); - cfg.maxpktsize=atol(str); - break; - - case 2: -helpbuf= -" Maximum Bundle Size \r\n\r\n" -"This is the maximum file size that SBBSecho will create when placing\r\n" -"outgoing packets into bundles. The default size is 250k.\r\n"; - sprintf(str,"%lu",cfg.maxbdlsize); - uinput(WIN_MID|WIN_BOT,0,0,"Maximum Bundle Size",str - ,9,K_EDIT|K_NUMBER); - cfg.maxbdlsize=atol(str); - break; - - case 3: -helpbuf= -" Areafix Failure Notification \r\n\r\n" -"Setting this option to a user number (usually #1), enables the\r\n" -"automatic notification of that user, via e-mail, of failed areafix\r\n" -"attempts. Setting this option to 0, disables this feature.\r\n"; - sprintf(str,"%u",cfg.notify); - uinput(WIN_MID|WIN_BOT,0,0,"Areafix Notification User Number",str - ,5,K_EDIT|K_NUMBER); - cfg.notify=atoi(str); - break; - - case 4: -helpbuf= -" Nodes... \r\n\r\n" -"From this menu you can configure the area manager options for your\r\n" -"uplink nodes.\r\n"; - i=0; - while(1) { - for(j=0;ji;j--) - memcpy(&cfg.nodecfg[j],&cfg.nodecfg[j-1] - ,sizeof(nodecfg_t)); - cfg.nodecfgs++; - memset(&cfg.nodecfg[i],0,sizeof(nodecfg_t)); - cfg.nodecfg[i].faddr=atofaddr(str); - continue; } - - if((i&MSK_ON)==MSK_DEL) { - i&=MSK_OFF; - cfg.nodecfgs--; - if(cfg.nodecfgs<=0) { - cfg.nodecfgs=0; - continue; } - for(j=i;jcfg.arcdefs ? - "None":cfg.arcdef[cfg.nodecfg[i].arctype].name); - sprintf(opt[j++],"%-20.20s %s","Packet Type" - ,cfg.nodecfg[i].pkt_type==PKT_TWO ? "2" - :cfg.nodecfg[i].pkt_type==PKT_TWO_TWO ? "2.2":"2+"); - sprintf(opt[j++],"%-20.20s %s","Packet Password" - ,cfg.nodecfg[i].pktpwd); - sprintf(opt[j++],"%-20.20s %s","Areafix Password" - ,cfg.nodecfg[i].password); - str[0]=0; - for(k=0;k=cfg.arcdefs) - cfg.nodecfg[i].arctype=0xffff; - else - cfg.nodecfg[i].arctype=k; - break; - case 2: -helpbuf= -" Packet Type \r\n\r\n" -"This is the packet header type that will be used in mail packets to\r\n" -"this node. SBBSecho defaults to using type 2.2.\r\n"; - j=0; - strcpy(opt[j++],"2+"); - strcpy(opt[j++],"2.2"); - strcpy(opt[j++],"2"); - opt[j][0]=0; - j=cfg.nodecfg[i].pkt_type; - k=ulist(WIN_RHT|WIN_SAV,0,0,0,&j,0,"Packet Type" - ,opt); - if(k==-1) - break; - cfg.nodecfg[i].pkt_type=k; - break; - case 3: -helpbuf= -" Packet Password \r\n\r\n" -"This is an optional password that SBBSecho will place into packets\r\n" -"destined for this node.\r\n"; - uinput(WIN_MID|WIN_SAV,0,0 - ,"Packet Password (optional)" - ,cfg.nodecfg[i].pktpwd,8,K_EDIT|K_UPPER); - break; - case 4: -helpbuf= -" Areafix Password \r\n\r\n" -"This is the password that will be used by this node when doing remote\r\n" -"areamanager functions.\r\n"; - uinput(WIN_MID|WIN_SAV,0,0 - ,"Areafix Password" - ,cfg.nodecfg[i].password,8,K_EDIT|K_UPPER); - break; - case 5: -helpbuf= -" Areafix Flag \r\n\r\n" -"This is a flag to to be given to this node allowing access to one or\r\n" -"more of the configured echo lists\r\n"; - while(1) { - for(j=0;ji;j--) - memcpy(&cfg.nodecfg[i].flag[j] - ,&cfg.nodecfg[i].flag[j-1] - ,sizeof(flag_t)); - cfg.nodecfg[i].numflags++; - memset(&cfg.nodecfg[i].flag[k].flag - ,0,sizeof(flag_t)); - strcpy(cfg.nodecfg[i].flag[k].flag,str); - continue; } - - if((k&MSK_ON)==MSK_DEL) { - k&=MSK_OFF; - cfg.nodecfg[i].numflags--; - if(cfg.nodecfg[i].numflags<=0) { - cfg.nodecfg[i].numflags=0; - continue; } - for(j=k;j"); - sprintf(opt[i++],"%-30.30s %s","Secure Inbound (optional)" - ,cfg.secure[0] ? cfg.secure : "None Specified"); - sprintf(opt[i++],"%-30.30s %s","Outbound Directory" - ,cfg.outbound); - sprintf(opt[i++],"%-30.30s %s","Area File" - ,cfg.areafile[0] ? cfg.areafile - : "SCFG->DATA\\AREAS.BBS"); - sprintf(opt[i++],"%-30.30s %s","Log File" - ,cfg.logfile[0] ? cfg.logfile - : "SCFG->DATA\\SBBSECHO.LOG"); - opt[i][0]=NULL; - j=ulist(WIN_MID|WIN_ACT,0,0,60,&j,0 - ,"Paths and Filenames",opt); - if(j==-1) - break; - switch(j) { - case 0: -helpbuf= -" Inbound Directory \r\n\r\n" -"This is the complete path (drive and directory) where your front\r\n" -"end mailer stores, and where SBBSecho will look for, incoming message\r\n" -"bundles and packets."; - uinput(WIN_MID|WIN_SAV,0,0,"Inbound",cfg.inbound - ,50,K_EDIT|K_UPPER); - break; - - case 1: -helpbuf= -" Secure Inbound Directory \r\n\r\n" -"This is the complete path (drive and directory) where your front\r\n" -"end mailer stores, and where SBBSecho will look for, incoming message\r\n" -"bundles and packets for SECURE sessions."; - uinput(WIN_MID|WIN_SAV,0,0,"Secure Inbound",cfg.secure - ,50,K_EDIT|K_UPPER); - break; - - case 2: -helpbuf= -" Outbound Directory \r\n\r\n" -"This is the complete path (drive and directory) where your front\r\n" -"end mailer will look for, and where SBBSecho will place, outgoing\r\n" -"message bundles and packets."; - uinput(WIN_MID|WIN_SAV,0,0,"Outbound",cfg.outbound - ,50,K_EDIT|K_UPPER); - break; - - case 3: -helpbuf= -" Area File \r\n\r\n" -"This is the complete path (drive, directory, and filename) of the\r\n" -"file SBBSecho will use as your AREAS.BBS file."; - uinput(WIN_MID|WIN_SAV,0,0,"Areafile",cfg.areafile - ,50,K_EDIT|K_UPPER); - break; - - case 4: -helpbuf= -" Log File \r\n\r\n" -"This is the complete path (drive, directory, and filename) of the\r\n" -"file SBBSecho will use to log information each time it is run."; - uinput(WIN_MID|WIN_SAV,0,0,"Logfile",cfg.logfile - ,50,K_EDIT|K_UPPER); - break; } } - break; - case 6: -helpbuf= -" Log Options \r\n" -"\r\n" -"Each loggable item can be toggled off or on from this menu. You must run\r\n" -"SBBSecho with the /L command line option for any of these items to be\r\n" -"logged."; - j=0; - while(1) { - i=0; - strcpy(opt[i++],"ALL"); - strcpy(opt[i++],"NONE"); - strcpy(opt[i++],"DEFAULT"); - sprintf(opt[i++],"%-35.35s%-3.3s","Ignored NetMail Messages" - ,cfg.log&LOG_IGNORED ? "Yes":"No"); - sprintf(opt[i++],"%-35.35s%-3.3s","NetMail for Unknown Users" - ,cfg.log&LOG_UNKNOWN ? "Yes":"No"); - sprintf(opt[i++],"%-35.35s%-3.3s","Areafix NetMail Messages" - ,cfg.log&LOG_AREAFIX ? "Yes":"No"); - sprintf(opt[i++],"%-35.35s%-3.3s","Imported NetMail Messages" - ,cfg.log&LOG_IMPORTED ? "Yes":"No"); - sprintf(opt[i++],"%-35.35s%-3.3s","Packing Out-bound NetMail" - ,cfg.log&LOG_PACKING ? "Yes":"No"); - sprintf(opt[i++],"%-35.35s%-3.3s","Routing Out-bound NetMail" - ,cfg.log&LOG_ROUTING ? "Yes":"No"); - sprintf(opt[i++],"%-35.35s%-3.3s","In-bound Packet Information" - ,cfg.log&LOG_PACKETS ? "Yes":"No"); - sprintf(opt[i++],"%-35.35s%-3.3s","In-bound Security Violations" - ,cfg.log&LOG_SECURITY ? "Yes":"No"); - sprintf(opt[i++],"%-35.35s%-3.3s","In-bound Grunged Messages" - ,cfg.log&LOG_GRUNGED ? "Yes":"No"); - sprintf(opt[i++],"%-35.35s%-3.3s","Disallowed Private EchoMail" - ,cfg.log&LOG_PRIVATE ? "Yes":"No"); - sprintf(opt[i++],"%-35.35s%-3.3s","Circular EchoMail Messages" - ,cfg.log&LOG_CIRCULAR ? "Yes":"No"); - sprintf(opt[i++],"%-35.35s%-3.3s","Duplicate EchoMail Messages" - ,cfg.log&LOG_DUPES ? "Yes":"No"); - sprintf(opt[i++],"%-35.35s%-3.3s","Area Totals" - ,cfg.log&LOG_AREA_TOTALS ? "Yes":"No"); - sprintf(opt[i++],"%-35.35s%-3.3s","Over-All Totals" - ,cfg.log&LOG_TOTALS ? "Yes":"No"); - opt[i][0]=NULL; - j=ulist(0,0,0,43,&j,0,"Log Options",opt); - if(j==-1) - break; - switch(j) { - case 0: - cfg.log=~0L; - break; - case 1: - cfg.log=0; - break; - case 2: - cfg.log=LOG_DEFAULTS; - break; - case 3: - cfg.log^=LOG_IGNORED; - break; - case 4: - cfg.log^=LOG_UNKNOWN; - break; - case 5: - cfg.log^=LOG_AREAFIX; - break; - case 6: - cfg.log^=LOG_IMPORTED; - break; - case 7: - cfg.log^=LOG_PACKING; - break; - case 8: - cfg.log^=LOG_ROUTING; - break; - case 9: - cfg.log^=LOG_PACKETS; - break; - case 10: - cfg.log^=LOG_SECURITY; - break; - case 11: - cfg.log^=LOG_GRUNGED; - break; - case 12: - cfg.log^=LOG_PRIVATE; - break; - case 13: - cfg.log^=LOG_CIRCULAR; - break; - case 14: - cfg.log^=LOG_DUPES; - break; - case 15: - cfg.log^=LOG_AREA_TOTALS; - break; - case 16: - cfg.log^=LOG_TOTALS; - break; } } - break; - - - case 7: -helpbuf= -"Secure Operation tells SBBSecho to check the AREAS.BBS file to insure\r\n" -" that the packet origin exists there as well as check the password of\r\n" -" that node (if configured).\r\n\r\n" -"Swap for Executables tells SBBSecho whether or not it should swap\r\n" -" out of memory when executing external executables.\r\n\r\n" -"Fuzzy Zone Operation when set to yes if SBBSecho receives an inbound\r\n" -" netmail with no international zone information, it will compare the\r\n" -" net/node of the destination to the net/node information in your AKAs\r\n" -" and assume the zone of a matching AKA.\r\n\r\n" -"Store PATH/SEEN-BY/Unkown Kludge Lines in Message Base allows you to\r\n" -" determine whether or not SBBSecho will store this information from\r\n" -" incoming messages in the Synchronet message base.\r\n\r\n" -"Allow Nodes to Add Areas in the AREAS.BBS List when set to YES allows\r\n" -" uplinks to add areas listed in the AREAS.BBS file\r\n"; - j=0; - while(1) { - i=0; - sprintf(opt[i++],"%-50.50s%-3.3s","Secure Operation" - ,misc&SECURE ? "Yes":"No"); - sprintf(opt[i++],"%-50.50s%-3.3s","Swap for Executables" - ,node_swap ? "Yes":"No"); - sprintf(opt[i++],"%-50.50s%-3.3s","Fuzzy Zone Operation" - ,misc&FUZZY_ZONE ? "Yes":"No"); - sprintf(opt[i++],"%-50.50s%-3.3s","Store PATH Lines in " - "Message Base",misc&STORE_SEENBY ? "Yes":"No"); - sprintf(opt[i++],"%-50.50s%-3.3s","Store SEEN-BY Lines in " - "Message Base",misc&STORE_PATH ? "Yes":"No"); - sprintf(opt[i++],"%-50.50s%-3.3s","Store Unknown Kludge Lines " - "in Message Base",misc&STORE_KLUDGE ? "Yes":"No"); - sprintf(opt[i++],"%-50.50s%-3.3s","Allow Nodes to Add Areas " - "in the AREAS.BBS List",misc&ELIST_ONLY?"No":"Yes"); - sprintf(opt[i++],"%-50.50s%-3.3s","Kill/Ignore Empty NetMail " - "Messages",misc&KILL_EMPTY_MAIL ? "Yes":"No"); - opt[i][0]=NULL; - j=ulist(0,0,0,60,&j,0,"Toggle Options",opt); - if(j==-1) - break; - switch(j) { - case 0: - misc^=SECURE; - break; - case 1: - if(node_swap) - node_swap=0; - else - node_swap=1; - break; - case 2: - misc^=FUZZY_ZONE; - break; - case 3: - misc^=STORE_SEENBY; - break; - case 4: - misc^=STORE_PATH; - break; - case 5: - misc^=STORE_KLUDGE; - break; - case 6: - misc^=ELIST_ONLY; - break; - case 7: - misc^=KILL_EMPTY_MAIL; - } } - break; - case 8: -helpbuf= -" Archive Programs \r\n\r\n" -"These are the archiving programs (types) which are available for\r\n" -"compressing outgoing packets.\r\n"; - i=0; - while(1) { - for(j=0;ji;j--) - memcpy(&cfg.arcdef[j],&cfg.arcdef[j-1] - ,sizeof(arcdef_t)); - strcpy(cfg.arcdef[j].name - ,cfg.arcdef[j-1].name); - cfg.arcdefs++; - memset(&cfg.arcdef[i],0,sizeof(arcdef_t)); - strcpy(cfg.arcdef[i].name,str); - continue; } - - if((i&MSK_ON)==MSK_DEL) { - i&=MSK_OFF; - cfg.arcdefs--; - if(cfg.arcdefs<=0) { - cfg.arcdefs=0; - continue; } - for(j=i;ji;j--) - memcpy(&cfg.listcfg[j],&cfg.listcfg[j-1] - ,sizeof(echolist_t)); - cfg.listcfgs++; - memset(&cfg.listcfg[i],0,sizeof(echolist_t)); - strcpy(cfg.listcfg[i].listpath,str); - continue; } - - if((i&MSK_ON)==MSK_DEL) { - i&=MSK_OFF; - cfg.listcfgs--; - if(cfg.listcfgs<=0) { - cfg.listcfgs=0; - continue; } - for(j=i;jx;j--) - memcpy(&cfg.listcfg[i].flag[j] - ,&cfg.listcfg[i].flag[j-1] - ,sizeof(flag_t)); - cfg.listcfg[i].numflags++; - memset(&cfg.listcfg[i].flag[x].flag - ,0,sizeof(flag_t)); - strcpy(cfg.listcfg[i].flag[x].flag,str); - continue; } - - if((x&MSK_ON)==MSK_DEL) { - x&=MSK_OFF; - cfg.listcfg[i].numflags--; - if(cfg.listcfg[i].numflags<=0) { - cfg.listcfg[i].numflags=0; - continue; } - for(j=x;j +#include +#include "gen_defs.h" +#include "sbbsdefs.h" +#include "sbbsecho.h" + +char **opt; + +void bail(int code); +void main(); +char fexist(char *filespec); +char *faddrtoa(faddr_t addr); + +uchar node_swap=1; +long misc=0; +config_t cfg; + +unsigned _stklen=16000; + +void bail(int code) +{ + +if(code) + getch(); +uifcbail(); +exit(code); +} + +#define lprintf cprintf + +void main(int argc, char **argv) +{ + char str[256],*p; + int i,j,k,x,file,dflt,nodeop=0; + FILE *stream; + echolist_t savlistcfg; + nodecfg_t savnodecfg; + arcdef_t savarcdef; + +fprintf(stderr,"\nSBBSecho Configuration Version %s Developed 1995-1997 " + "Rob Swindell\n\n",SBBSECHO_VER); + +memset(&cfg,0,sizeof(config_t)); +if(argc>1) + strcpy(str,argv[1]); +else { + p=getenv("SBBSCTRL"); + if(!p) { + p=getenv("SBBSNODE"); + if(!p) { + printf("usage: echocfg [cfg_file]\n"); + exit(1); } + strcpy(str,p); + if(str[strlen(str)-1]!='\\') + strcat(str,"\\"); + strcat(str,"..\\CTRL\\SBBSECHO.CFG"); } + else { + strcpy(str,p); + if(str[strlen(str)-1]!='\\') + strcat(str,"\\"); + strcat(str,"SBBSECHO.CFG"); } } +strcpy(cfg.cfgfile,str); +strupr(cfg.cfgfile); + +read_cfg(); + +savnum=0; +if((opt=(char **)MALLOC(sizeof(char *)*300))==NULL) { + cputs("memory allocation error\r\n"); + bail(1); } +for(i=0;i<300;i++) + if((opt[i]=(char *)MALLOC(MAX_OPLN))==NULL) { + cputs("memory allocation error\r\n"); + bail(1); } +uifcini(); +sprintf(str,"SBBSecho Configuration v%s",SBBSECHO_VER); +uscrn(str); + +dflt=0; +while(1) { + helpbuf= +" SBBSecho Configuration \r\n\r\n" +"Move through the various options using the arrow keys. Select the\r\n" +"highlighted options by pressing ENTER.\r\n\r\n"; + i=0; + sprintf(opt[i++],"%-30.30s %s","Mailer Type" + ,misc&FLO_MAILER ? "Binkley/FLO":"FrontDoor/Attach"); + sprintf(opt[i++],"%-30.30s %luK","Maximum Packet Size" + ,cfg.maxpktsize/1024UL); + sprintf(opt[i++],"%-30.30s %luK","Maximum Bundle Size" + ,cfg.maxbdlsize/1024UL); + if(cfg.notify) + sprintf(str,"User #%u",cfg.notify); + else + strcpy(str,"Disabled"); + sprintf(opt[i++],"%-30.30s %s","Areafix Failure Notification",str); + sprintf(opt[i++],"Nodes..."); + sprintf(opt[i++],"Paths..."); + sprintf(opt[i++],"Log Options..."); + sprintf(opt[i++],"Toggle Options..."); + sprintf(opt[i++],"Archive Programs..."); + sprintf(opt[i++],"Additional Echo Lists..."); + opt[i][0]=NULL; + switch(ulist(WIN_ORG|WIN_MID|WIN_ACT|WIN_ESC,0,0,52,&dflt,0 + ,cfg.cfgfile,opt)) { + + case 0: + misc^=FLO_MAILER; + break; + + case 1: +helpbuf= +" Maximum Packet Size \r\n\r\n" +"This is the maximum file size that SBBSecho will create when placing\r\n" +"outgoing messages into packets. The default size is 250k.\r\n"; + sprintf(str,"%lu",cfg.maxpktsize); + uinput(WIN_MID|WIN_BOT,0,0,"Maximum Packet Size",str + ,9,K_EDIT|K_NUMBER); + cfg.maxpktsize=atol(str); + break; + + case 2: +helpbuf= +" Maximum Bundle Size \r\n\r\n" +"This is the maximum file size that SBBSecho will create when placing\r\n" +"outgoing packets into bundles. The default size is 250k.\r\n"; + sprintf(str,"%lu",cfg.maxbdlsize); + uinput(WIN_MID|WIN_BOT,0,0,"Maximum Bundle Size",str + ,9,K_EDIT|K_NUMBER); + cfg.maxbdlsize=atol(str); + break; + + case 3: +helpbuf= +" Areafix Failure Notification \r\n\r\n" +"Setting this option to a user number (usually #1), enables the\r\n" +"automatic notification of that user, via e-mail, of failed areafix\r\n" +"attempts. Setting this option to 0, disables this feature.\r\n"; + sprintf(str,"%u",cfg.notify); + uinput(WIN_MID|WIN_BOT,0,0,"Areafix Notification User Number",str + ,5,K_EDIT|K_NUMBER); + cfg.notify=atoi(str); + break; + + case 4: +helpbuf= +" Nodes... \r\n\r\n" +"From this menu you can configure the area manager options for your\r\n" +"uplink nodes.\r\n"; + i=0; + while(1) { + for(j=0;ji;j--) + memcpy(&cfg.nodecfg[j],&cfg.nodecfg[j-1] + ,sizeof(nodecfg_t)); + cfg.nodecfgs++; + memset(&cfg.nodecfg[i],0,sizeof(nodecfg_t)); + cfg.nodecfg[i].faddr=atofaddr(str); + continue; } + + if((i&MSK_ON)==MSK_DEL) { + i&=MSK_OFF; + cfg.nodecfgs--; + if(cfg.nodecfgs<=0) { + cfg.nodecfgs=0; + continue; } + for(j=i;jcfg.arcdefs ? + "None":cfg.arcdef[cfg.nodecfg[i].arctype].name); + sprintf(opt[j++],"%-20.20s %s","Packet Type" + ,cfg.nodecfg[i].pkt_type==PKT_TWO ? "2" + :cfg.nodecfg[i].pkt_type==PKT_TWO_TWO ? "2.2":"2+"); + sprintf(opt[j++],"%-20.20s %s","Packet Password" + ,cfg.nodecfg[i].pktpwd); + sprintf(opt[j++],"%-20.20s %s","Areafix Password" + ,cfg.nodecfg[i].password); + str[0]=0; + for(k=0;k=cfg.arcdefs) + cfg.nodecfg[i].arctype=0xffff; + else + cfg.nodecfg[i].arctype=k; + break; + case 2: +helpbuf= +" Packet Type \r\n\r\n" +"This is the packet header type that will be used in mail packets to\r\n" +"this node. SBBSecho defaults to using type 2.2.\r\n"; + j=0; + strcpy(opt[j++],"2+"); + strcpy(opt[j++],"2.2"); + strcpy(opt[j++],"2"); + opt[j][0]=0; + j=cfg.nodecfg[i].pkt_type; + k=ulist(WIN_RHT|WIN_SAV,0,0,0,&j,0,"Packet Type" + ,opt); + if(k==-1) + break; + cfg.nodecfg[i].pkt_type=k; + break; + case 3: +helpbuf= +" Packet Password \r\n\r\n" +"This is an optional password that SBBSecho will place into packets\r\n" +"destined for this node.\r\n"; + uinput(WIN_MID|WIN_SAV,0,0 + ,"Packet Password (optional)" + ,cfg.nodecfg[i].pktpwd,8,K_EDIT|K_UPPER); + break; + case 4: +helpbuf= +" Areafix Password \r\n\r\n" +"This is the password that will be used by this node when doing remote\r\n" +"areamanager functions.\r\n"; + uinput(WIN_MID|WIN_SAV,0,0 + ,"Areafix Password" + ,cfg.nodecfg[i].password,8,K_EDIT|K_UPPER); + break; + case 5: +helpbuf= +" Areafix Flag \r\n\r\n" +"This is a flag to to be given to this node allowing access to one or\r\n" +"more of the configured echo lists\r\n"; + while(1) { + for(j=0;ji;j--) + memcpy(&cfg.nodecfg[i].flag[j] + ,&cfg.nodecfg[i].flag[j-1] + ,sizeof(flag_t)); + cfg.nodecfg[i].numflags++; + memset(&cfg.nodecfg[i].flag[k].flag + ,0,sizeof(flag_t)); + strcpy(cfg.nodecfg[i].flag[k].flag,str); + continue; } + + if((k&MSK_ON)==MSK_DEL) { + k&=MSK_OFF; + cfg.nodecfg[i].numflags--; + if(cfg.nodecfg[i].numflags<=0) { + cfg.nodecfg[i].numflags=0; + continue; } + for(j=k;j"); + sprintf(opt[i++],"%-30.30s %s","Secure Inbound (optional)" + ,cfg.secure[0] ? cfg.secure : "None Specified"); + sprintf(opt[i++],"%-30.30s %s","Outbound Directory" + ,cfg.outbound); + sprintf(opt[i++],"%-30.30s %s","Area File" + ,cfg.areafile[0] ? cfg.areafile + : "SCFG->DATA\\AREAS.BBS"); + sprintf(opt[i++],"%-30.30s %s","Log File" + ,cfg.logfile[0] ? cfg.logfile + : "SCFG->DATA\\SBBSECHO.LOG"); + opt[i][0]=NULL; + j=ulist(WIN_MID|WIN_ACT,0,0,60,&j,0 + ,"Paths and Filenames",opt); + if(j==-1) + break; + switch(j) { + case 0: +helpbuf= +" Inbound Directory \r\n\r\n" +"This is the complete path (drive and directory) where your front\r\n" +"end mailer stores, and where SBBSecho will look for, incoming message\r\n" +"bundles and packets."; + uinput(WIN_MID|WIN_SAV,0,0,"Inbound",cfg.inbound + ,50,K_EDIT|K_UPPER); + break; + + case 1: +helpbuf= +" Secure Inbound Directory \r\n\r\n" +"This is the complete path (drive and directory) where your front\r\n" +"end mailer stores, and where SBBSecho will look for, incoming message\r\n" +"bundles and packets for SECURE sessions."; + uinput(WIN_MID|WIN_SAV,0,0,"Secure Inbound",cfg.secure + ,50,K_EDIT|K_UPPER); + break; + + case 2: +helpbuf= +" Outbound Directory \r\n\r\n" +"This is the complete path (drive and directory) where your front\r\n" +"end mailer will look for, and where SBBSecho will place, outgoing\r\n" +"message bundles and packets."; + uinput(WIN_MID|WIN_SAV,0,0,"Outbound",cfg.outbound + ,50,K_EDIT|K_UPPER); + break; + + case 3: +helpbuf= +" Area File \r\n\r\n" +"This is the complete path (drive, directory, and filename) of the\r\n" +"file SBBSecho will use as your AREAS.BBS file."; + uinput(WIN_MID|WIN_SAV,0,0,"Areafile",cfg.areafile + ,50,K_EDIT|K_UPPER); + break; + + case 4: +helpbuf= +" Log File \r\n\r\n" +"This is the complete path (drive, directory, and filename) of the\r\n" +"file SBBSecho will use to log information each time it is run."; + uinput(WIN_MID|WIN_SAV,0,0,"Logfile",cfg.logfile + ,50,K_EDIT|K_UPPER); + break; } } + break; + case 6: +helpbuf= +" Log Options \r\n" +"\r\n" +"Each loggable item can be toggled off or on from this menu. You must run\r\n" +"SBBSecho with the /L command line option for any of these items to be\r\n" +"logged."; + j=0; + while(1) { + i=0; + strcpy(opt[i++],"ALL"); + strcpy(opt[i++],"NONE"); + strcpy(opt[i++],"DEFAULT"); + sprintf(opt[i++],"%-35.35s%-3.3s","Ignored NetMail Messages" + ,cfg.log&LOG_IGNORED ? "Yes":"No"); + sprintf(opt[i++],"%-35.35s%-3.3s","NetMail for Unknown Users" + ,cfg.log&LOG_UNKNOWN ? "Yes":"No"); + sprintf(opt[i++],"%-35.35s%-3.3s","Areafix NetMail Messages" + ,cfg.log&LOG_AREAFIX ? "Yes":"No"); + sprintf(opt[i++],"%-35.35s%-3.3s","Imported NetMail Messages" + ,cfg.log&LOG_IMPORTED ? "Yes":"No"); + sprintf(opt[i++],"%-35.35s%-3.3s","Packing Out-bound NetMail" + ,cfg.log&LOG_PACKING ? "Yes":"No"); + sprintf(opt[i++],"%-35.35s%-3.3s","Routing Out-bound NetMail" + ,cfg.log&LOG_ROUTING ? "Yes":"No"); + sprintf(opt[i++],"%-35.35s%-3.3s","In-bound Packet Information" + ,cfg.log&LOG_PACKETS ? "Yes":"No"); + sprintf(opt[i++],"%-35.35s%-3.3s","In-bound Security Violations" + ,cfg.log&LOG_SECURITY ? "Yes":"No"); + sprintf(opt[i++],"%-35.35s%-3.3s","In-bound Grunged Messages" + ,cfg.log&LOG_GRUNGED ? "Yes":"No"); + sprintf(opt[i++],"%-35.35s%-3.3s","Disallowed Private EchoMail" + ,cfg.log&LOG_PRIVATE ? "Yes":"No"); + sprintf(opt[i++],"%-35.35s%-3.3s","Circular EchoMail Messages" + ,cfg.log&LOG_CIRCULAR ? "Yes":"No"); + sprintf(opt[i++],"%-35.35s%-3.3s","Duplicate EchoMail Messages" + ,cfg.log&LOG_DUPES ? "Yes":"No"); + sprintf(opt[i++],"%-35.35s%-3.3s","Area Totals" + ,cfg.log&LOG_AREA_TOTALS ? "Yes":"No"); + sprintf(opt[i++],"%-35.35s%-3.3s","Over-All Totals" + ,cfg.log&LOG_TOTALS ? "Yes":"No"); + opt[i][0]=NULL; + j=ulist(0,0,0,43,&j,0,"Log Options",opt); + if(j==-1) + break; + switch(j) { + case 0: + cfg.log=~0L; + break; + case 1: + cfg.log=0; + break; + case 2: + cfg.log=LOG_DEFAULTS; + break; + case 3: + cfg.log^=LOG_IGNORED; + break; + case 4: + cfg.log^=LOG_UNKNOWN; + break; + case 5: + cfg.log^=LOG_AREAFIX; + break; + case 6: + cfg.log^=LOG_IMPORTED; + break; + case 7: + cfg.log^=LOG_PACKING; + break; + case 8: + cfg.log^=LOG_ROUTING; + break; + case 9: + cfg.log^=LOG_PACKETS; + break; + case 10: + cfg.log^=LOG_SECURITY; + break; + case 11: + cfg.log^=LOG_GRUNGED; + break; + case 12: + cfg.log^=LOG_PRIVATE; + break; + case 13: + cfg.log^=LOG_CIRCULAR; + break; + case 14: + cfg.log^=LOG_DUPES; + break; + case 15: + cfg.log^=LOG_AREA_TOTALS; + break; + case 16: + cfg.log^=LOG_TOTALS; + break; } } + break; + + + case 7: +helpbuf= +"Secure Operation tells SBBSecho to check the AREAS.BBS file to insure\r\n" +" that the packet origin exists there as well as check the password of\r\n" +" that node (if configured).\r\n\r\n" +"Swap for Executables tells SBBSecho whether or not it should swap\r\n" +" out of memory when executing external executables.\r\n\r\n" +"Fuzzy Zone Operation when set to yes if SBBSecho receives an inbound\r\n" +" netmail with no international zone information, it will compare the\r\n" +" net/node of the destination to the net/node information in your AKAs\r\n" +" and assume the zone of a matching AKA.\r\n\r\n" +"Store PATH/SEEN-BY/Unkown Kludge Lines in Message Base allows you to\r\n" +" determine whether or not SBBSecho will store this information from\r\n" +" incoming messages in the Synchronet message base.\r\n\r\n" +"Allow Nodes to Add Areas in the AREAS.BBS List when set to YES allows\r\n" +" uplinks to add areas listed in the AREAS.BBS file\r\n"; + j=0; + while(1) { + i=0; + sprintf(opt[i++],"%-50.50s%-3.3s","Secure Operation" + ,misc&SECURE ? "Yes":"No"); + sprintf(opt[i++],"%-50.50s%-3.3s","Swap for Executables" + ,node_swap ? "Yes":"No"); + sprintf(opt[i++],"%-50.50s%-3.3s","Fuzzy Zone Operation" + ,misc&FUZZY_ZONE ? "Yes":"No"); + sprintf(opt[i++],"%-50.50s%-3.3s","Store PATH Lines in " + "Message Base",misc&STORE_SEENBY ? "Yes":"No"); + sprintf(opt[i++],"%-50.50s%-3.3s","Store SEEN-BY Lines in " + "Message Base",misc&STORE_PATH ? "Yes":"No"); + sprintf(opt[i++],"%-50.50s%-3.3s","Store Unknown Kludge Lines " + "in Message Base",misc&STORE_KLUDGE ? "Yes":"No"); + sprintf(opt[i++],"%-50.50s%-3.3s","Allow Nodes to Add Areas " + "in the AREAS.BBS List",misc&ELIST_ONLY?"No":"Yes"); + sprintf(opt[i++],"%-50.50s%-3.3s","Kill/Ignore Empty NetMail " + "Messages",misc&KILL_EMPTY_MAIL ? "Yes":"No"); + opt[i][0]=NULL; + j=ulist(0,0,0,60,&j,0,"Toggle Options",opt); + if(j==-1) + break; + switch(j) { + case 0: + misc^=SECURE; + break; + case 1: + if(node_swap) + node_swap=0; + else + node_swap=1; + break; + case 2: + misc^=FUZZY_ZONE; + break; + case 3: + misc^=STORE_SEENBY; + break; + case 4: + misc^=STORE_PATH; + break; + case 5: + misc^=STORE_KLUDGE; + break; + case 6: + misc^=ELIST_ONLY; + break; + case 7: + misc^=KILL_EMPTY_MAIL; + } } + break; + case 8: +helpbuf= +" Archive Programs \r\n\r\n" +"These are the archiving programs (types) which are available for\r\n" +"compressing outgoing packets.\r\n"; + i=0; + while(1) { + for(j=0;ji;j--) + memcpy(&cfg.arcdef[j],&cfg.arcdef[j-1] + ,sizeof(arcdef_t)); + strcpy(cfg.arcdef[j].name + ,cfg.arcdef[j-1].name); + cfg.arcdefs++; + memset(&cfg.arcdef[i],0,sizeof(arcdef_t)); + strcpy(cfg.arcdef[i].name,str); + continue; } + + if((i&MSK_ON)==MSK_DEL) { + i&=MSK_OFF; + cfg.arcdefs--; + if(cfg.arcdefs<=0) { + cfg.arcdefs=0; + continue; } + for(j=i;ji;j--) + memcpy(&cfg.listcfg[j],&cfg.listcfg[j-1] + ,sizeof(echolist_t)); + cfg.listcfgs++; + memset(&cfg.listcfg[i],0,sizeof(echolist_t)); + strcpy(cfg.listcfg[i].listpath,str); + continue; } + + if((i&MSK_ON)==MSK_DEL) { + i&=MSK_OFF; + cfg.listcfgs--; + if(cfg.listcfgs<=0) { + cfg.listcfgs=0; + continue; } + for(j=i;jx;j--) + memcpy(&cfg.listcfg[i].flag[j] + ,&cfg.listcfg[i].flag[j-1] + ,sizeof(flag_t)); + cfg.listcfg[i].numflags++; + memset(&cfg.listcfg[i].flag[x].flag + ,0,sizeof(flag_t)); + strcpy(cfg.listcfg[i].flag[x].flag,str); + continue; } + + if((x&MSK_ON)==MSK_DEL) { + x&=MSK_OFF; + cfg.listcfg[i].numflags--; + if(cfg.listcfg[i].numflags<=0) { + cfg.listcfg[i].numflags=0; + continue; } + for(j=x;j