Annotation of sbbs/sbbs3/scfg/scfgnet.c, revision 1.1.1.1

1.1       root        1: /* scfgnet.c */
                      2: 
                      3: /* $Id: scfgnet.c,v 1.21 2004/09/17 08:13:21 rswindell Exp $ */
                      4: 
                      5: /****************************************************************************
                      6:  * @format.tab-size 4          (Plain Text/Source Code File Header)                    *
                      7:  * @format.use-tabs true       (see http://www.synchro.net/ptsc_hdr.html)              *
                      8:  *                                                                                                                                                     *
                      9:  * Copyright 2002 Rob Swindell - http://www.synchro.net/copyright.html         *
                     10:  *                                                                                                                                                     *
                     11:  * This program is free software; you can redistribute it and/or                       *
                     12:  * modify it under the terms of the GNU General Public License                         *
                     13:  * as published by the Free Software Foundation; either version 2                      *
                     14:  * of the License, or (at your option) any later version.                                      *
                     15:  * See the GNU General Public License for more details: gpl.txt or                     *
                     16:  * http://www.fsf.org/copyleft/gpl.html                                                                                *
                     17:  *                                                                                                                                                     *
                     18:  * Anonymous FTP access to the most recent released source is available at     *
                     19:  * ftp://vert.synchro.net, ftp://cvs.synchro.net and ftp://ftp.synchro.net     *
                     20:  *                                                                                                                                                     *
                     21:  * Anonymous CVS access to the development source and modification history     *
                     22:  * is available at cvs.synchro.net:/cvsroot/sbbs, example:                                     *
                     23:  * cvs -d :pserver:[email protected]:/cvsroot/sbbs login                       *
                     24:  *     (just hit return, no password is necessary)                                                     *
                     25:  * cvs -d :pserver:[email protected]:/cvsroot/sbbs checkout src                *
                     26:  *                                                                                                                                                     *
                     27:  * For Synchronet coding style and modification guidelines, see                                *
                     28:  * http://www.synchro.net/source.html                                                                          *
                     29:  *                                                                                                                                                     *
                     30:  * You are encouraged to submit any modifications (preferably in Unix diff     *
                     31:  * format) via e-mail to [email protected]                                                                      *
                     32:  *                                                                                                                                                     *
                     33:  * Note: If this box doesn't appear square, then you need to fix your tabs.    *
                     34:  ****************************************************************************/
                     35: 
                     36: #include "scfg.h"
                     37: 
                     38: void qhub_edit(int num);
                     39: void phub_edit(int num);
                     40: char *daystr(char days);
                     41: void qhub_sub_edit(uint num);
                     42: /****************************************************************************/
                     43: /* Returns the FidoNet address kept in str as ASCII.                        */
                     44: /****************************************************************************/
                     45: faddr_t atofaddr(char *str)
                     46: {
                     47:     char *p;
                     48:     faddr_t addr;
                     49: 
                     50: addr.zone=addr.net=addr.node=addr.point=0;
                     51: if((p=strchr(str,':'))!=NULL) {
                     52:     addr.zone=atoi(str);
                     53:     addr.net=atoi(p+1); }
                     54: else {
                     55:     if(cfg.total_faddrs)
                     56:                addr.zone=cfg.faddr[0].zone;
                     57:     else
                     58:         addr.zone=1;
                     59:     addr.net=atoi(str); }
                     60: if(!addr.zone)              /* no such thing as zone 0 */
                     61:     addr.zone=1;
                     62: if((p=strchr(str,'/'))!=NULL)
                     63:     addr.node=atoi(p+1);
                     64: else {
                     65:     if(cfg.total_faddrs)
                     66:                addr.net=cfg.faddr[0].net;
                     67:     else
                     68:         addr.net=1;
                     69:     addr.node=atoi(str); }
                     70: if((p=strchr(str,'.'))!=NULL)
                     71:     addr.point=atoi(p+1);
                     72: return(addr);
                     73: }
                     74: 
                     75: uint getsub(void)
                     76: {
                     77:        static int grp_dflt,sub_dflt,grp_bar,sub_bar;
                     78:        char str[81];
                     79:        int i,j,k;
                     80:        uint subnum[MAX_OPTS+1];
                     81: 
                     82: while(1) {
                     83:        for(i=0;i<cfg.total_grps && i<MAX_OPTS;i++)
                     84:                sprintf(opt[i],"%-25s",cfg.grp[i]->lname);
                     85:        opt[i][0]=0;
                     86:        i=uifc.list(WIN_SAV|WIN_RHT|WIN_BOT,0,0,45,&grp_dflt,&grp_bar
                     87:                ,"Message Groups"
                     88:                ,opt);
                     89:        if(i==-1)
                     90:                return(-1);
                     91:        for(j=k=0;j<cfg.total_subs && k<MAX_OPTS;j++)
                     92:                if(cfg.sub[j]->grp==i) {
                     93:                        sprintf(opt[k],"%-25s",cfg.sub[j]->lname);
                     94:                        subnum[k++]=j; }
                     95:        opt[k][0]=0;
                     96:        sprintf(str,"%s Sub-boards",cfg.grp[i]->sname);
                     97:        j=uifc.list(WIN_RHT|WIN_BOT|WIN_SAV,0,0,45,&sub_dflt,&sub_bar,str,opt);
                     98:        if(j==-1)
                     99:                continue;
                    100:        return(subnum[j]); }
                    101: 
                    102: }
                    103: 
                    104: void net_cfg()
                    105: {
                    106:        static  int net_dflt,qnet_dflt,pnet_dflt,fnet_dflt,inet_dflt
                    107:                        ,qhub_dflt,phub_dflt;
                    108:        char    str[81],done;
                    109:        int     i,j,k,l;
                    110: 
                    111: while(1) {
                    112:        i=0;
                    113:        strcpy(opt[i++],"Internet E-mail");
                    114:        strcpy(opt[i++],"QWK Packet Networks");
                    115:        strcpy(opt[i++],"FidoNet EchoMail and NetMail");
                    116:        strcpy(opt[i++],"PostLink Networks");
                    117:        opt[i][0]=0;
                    118:        SETHELP(WHERE);
                    119: /*
                    120: &Configure Networks:&
                    121: 
                    122: This is the network configuration menu. Select the type of network
                    123: technology that you want to configure.
                    124: */
                    125:        i=uifc.list(WIN_ORG|WIN_ACT|WIN_CHE,0,0,0,&net_dflt,0,"Networks",opt);
                    126:        if(i==1) {      /* QWK net stuff */
                    127:                done=0;
                    128:                while(!done) {
                    129:                        i=0;
                    130:                        strcpy(opt[i++],"Network Hubs...");
                    131:                        strcpy(opt[i++],"Default Tagline");
                    132:                        opt[i][0]=0;
                    133:                        SETHELP(WHERE);
                    134: /*
                    135: &QWK Packet Networks:&
                    136: 
                    137: From this menu you can configure the default tagline to use for
                    138: outgoing messages on QWK networked sub-boards, or you can select
                    139: &Network Hubs...& to add, delete, or configure QWK hubs that your system
                    140: calls to exchange packets with.
                    141: */
                    142:                        i=uifc.list(WIN_ACT|WIN_RHT|WIN_BOT|WIN_CHE,0,0,0,&qnet_dflt,0
                    143:                                ,"QWK Packet Networks",opt);
                    144:                        uifc.savnum=0;
                    145:                        switch(i) {
                    146:                                case -1:        /* ESC */
                    147:                                        done=1;
                    148:                                        break;
                    149:                                case 1:
                    150:                                        SETHELP(WHERE);
                    151: /*
                    152: &QWK Network Default Tagline:&
                    153: 
                    154: This is the default tagline to use for outgoing messages on QWK
                    155: networked sub-boards. This default can be overridden on a per sub-board
                    156: basis with the sub-board configuration &Network Options...&.
                    157: */
                    158:                                        uifc.input(WIN_MID|WIN_SAV,0,0,nulstr
                    159:                                                ,cfg.qnet_tagline,sizeof(cfg.qnet_tagline)-1,K_MSG|K_EDIT);
                    160:                                        break;
                    161:                                case 0:
                    162:                                        while(1) {
                    163:                                                for(i=0;i<cfg.total_qhubs && i<MAX_OPTS;i++)
                    164:                                                        sprintf(opt[i],"%-8.8s",cfg.qhub[i]->id);
                    165:                                                opt[i][0]=0;
                    166:                                                i=WIN_ACT|WIN_RHT|WIN_SAV;
                    167:                                                if(cfg.total_qhubs<MAX_OPTS)
                    168:                                                        i|=WIN_INS|WIN_INSACT|WIN_XTR;
                    169:                                                if(cfg.total_qhubs)
                    170:                                                        i|=WIN_DEL;
                    171:                                                uifc.savnum=0;
                    172:                                                SETHELP(WHERE);
                    173: /*
                    174: &QWK Network Hubs:&
                    175: 
                    176: This is a list of QWK network hubs that your system calls to exchange
                    177: packets with.
                    178: 
                    179: To add a hub, select the desired location with the arrow keys and hit
                    180:  INS .
                    181: 
                    182: To delete a hub, select it and hit  DEL .
                    183: 
                    184: To configure a hub, select it and hit  ENTER .
                    185: */
                    186:                                                i=uifc.list(i,0,0,0,&qhub_dflt,0
                    187:                                                        ,"QWK Network Hubs",opt);
                    188:                                                if(i==-1)
                    189:                                                        break;
                    190:                                                if((i&MSK_ON)==MSK_INS) {
                    191:                                                        i&=MSK_OFF;
                    192:                                                        if((cfg.qhub=(qhub_t **)REALLOC(cfg.qhub
                    193:                                 ,sizeof(qhub_t *)*(cfg.total_qhubs+1)))==NULL) {
                    194:                                 errormsg(WHERE,ERR_ALLOC,nulstr
                    195:                                     ,sizeof(qhub_t *)*(cfg.total_qhubs+1));
                    196:                                                                cfg.total_qhubs=0;
                    197:                                                                bail(1);
                    198:                                 continue; }
                    199: 
                    200:                                                        uifc.savnum=1;
                    201:                                                        SETHELP(WHERE);
                    202: /*
                    203: &QWK Network Hub System ID:&
                    204: 
                    205: This is the QWK System ID of this hub. It is used for incoming and
                    206: outgoing network packets and must be accurate.
                    207: */
                    208:                                                        if(uifc.input(WIN_MID|WIN_SAV,0,0
                    209:                                                                ,"System ID",str,LEN_QWKID,K_UPPER)<1)
                    210:                                                                continue;
                    211: 
                    212:                                                        for(j=cfg.total_qhubs;j>i;j--)
                    213:                                 cfg.qhub[j]=cfg.qhub[j-1];
                    214:                                                        if((cfg.qhub[i]=(qhub_t *)MALLOC(sizeof(qhub_t)))
                    215:                                                                ==NULL) {
                    216:                                                                errormsg(WHERE,ERR_ALLOC,nulstr
                    217:                                                                        ,sizeof(qhub_t));
                    218:                                                                continue; }
                    219:                                                        memset(cfg.qhub[i],0,sizeof(qhub_t));
                    220:                                                        strcpy(cfg.qhub[i]->id,str);
                    221:                                                        strcpy(cfg.qhub[i]->pack,"%!pkzip %f %s");
                    222:                                                        strcpy(cfg.qhub[i]->unpack,"%!pkunzip -o %f %g %s");
                    223:                                                        strcpy(cfg.qhub[i]->call,"*qnet-ftp VERT vert.synchro.net YOURPASS");
                    224:                                                        cfg.qhub[i]->node=1;
                    225:                                                        cfg.qhub[i]->days=0xff; /* all days */
                    226:                                                        cfg.total_qhubs++;
                    227:                                                        uifc.changes=1;
                    228:                                                        continue; }
                    229:                                                if((i&MSK_ON)==MSK_DEL) {
                    230:                                                        i&=MSK_OFF;
                    231:                                                        FREE(cfg.qhub[i]->mode);
                    232:                                                        FREE(cfg.qhub[i]->conf);
                    233:                                                        FREE(cfg.qhub[i]->sub);
                    234:                                                        FREE(cfg.qhub[i]);
                    235:                                                        cfg.total_qhubs--;
                    236:                                                        while(i<cfg.total_qhubs) {
                    237:                                                                cfg.qhub[i]=cfg.qhub[i+1];
                    238:                                                                i++; }
                    239:                                                        uifc.changes=1;
                    240:                                                        continue; }
                    241:                                                qhub_edit(i); }
                    242:                                        break; } } }
                    243: 
                    244:        else if(i==2) {         /* FidoNet Stuff */
                    245:                done=0;
                    246:                while(!done) {
                    247:                        i=0;
                    248:                        sprintf(opt[i++],"%-27.27s%s"
                    249:                                ,"System Addresses",cfg.total_faddrs
                    250:                        ? smb_faddrtoa(&cfg.faddr[0],tmp) : nulstr);
                    251:                        sprintf(opt[i++],"%-27.27s%s"
                    252:                                ,"Default Outbound Address"
                    253:                                ,cfg.dflt_faddr.zone
                    254:                        ? smb_faddrtoa(&cfg.dflt_faddr,tmp) : "No");
                    255:                        sprintf(opt[i++],"%-27.27s"
                    256:                                ,"Default Origin Line");
                    257:                        sprintf(opt[i++],"%-27.27s%.40s"
                    258:                                ,"NetMail Semaphore",cfg.netmail_sem);
                    259:                        sprintf(opt[i++],"%-27.27s%.40s"
                    260:                                ,"EchoMail Semaphore",cfg.echomail_sem);
                    261:                        sprintf(opt[i++],"%-27.27s%.40s"
                    262:                                ,"Inbound File Directory",cfg.fidofile_dir);
                    263:                        sprintf(opt[i++],"%-27.27s%.40s"
                    264:                                ,"EchoMail Base Directory",cfg.echomail_dir);
                    265:                        sprintf(opt[i++],"%-27.27s%.40s"
                    266:                                ,"NetMail Directory",cfg.netmail_dir);
                    267:                        sprintf(opt[i++],"%-27.27s%s"
                    268:                                ,"Allow Sending of NetMail"
                    269:                                ,cfg.netmail_misc&NMAIL_ALLOW ? "Yes":"No");
                    270:                        sprintf(opt[i++],"%-27.27s%s"
                    271:                                ,"Allow File Attachments"
                    272:                                ,cfg.netmail_misc&NMAIL_FILE ? "Yes":"No");
                    273:                        sprintf(opt[i++],"%-27.27s%s"
                    274:                                ,"Send NetMail Using Alias"
                    275:                                ,cfg.netmail_misc&NMAIL_ALIAS ? "Yes":"No");
                    276:                        sprintf(opt[i++],"%-27.27s%s"
                    277:                                ,"NetMail Defaults to Crash"
                    278:                                ,cfg.netmail_misc&NMAIL_CRASH ? "Yes":"No");
                    279:                        sprintf(opt[i++],"%-27.27s%s"
                    280:                                ,"NetMail Defaults to Direct"
                    281:                                ,cfg.netmail_misc&NMAIL_DIRECT ? "Yes":"No");
                    282:                        sprintf(opt[i++],"%-27.27s%s"
                    283:                                ,"NetMail Defaults to Hold"
                    284:                                ,cfg.netmail_misc&NMAIL_HOLD ? "Yes":"No");
                    285:                        sprintf(opt[i++],"%-27.27s%s"
                    286:                                ,"Kill NetMail After Sent"
                    287:                                ,cfg.netmail_misc&NMAIL_KILL ? "Yes":"No");
                    288:                        sprintf(opt[i++],"%-27.27s%lu"
                    289:                                ,"Cost to Send NetMail",cfg.netmail_cost);
                    290:                        opt[i][0]=0;
                    291:                        SETHELP(WHERE);
                    292: /*
                    293: &FidoNet EchoMail and NetMail:&
                    294: 
                    295: This menu contains configuration options that pertain specifically to
                    296: networking E-mail (NetMail) and sub-boards (EchoMail) through networks
                    297: using FidoNet technology.
                    298: */
                    299:                        i=uifc.list(WIN_ACT|WIN_MID|WIN_CHE,0,0,60,&fnet_dflt,0
                    300:                                ,"FidoNet EchoMail and NetMail",opt);
                    301:                        uifc.savnum=0;
                    302:                        switch(i) {
                    303:                                case -1:        /* ESC */
                    304:                                        done=1;
                    305:                                        break;
                    306:                                case 0:
                    307:                                        SETHELP(WHERE);
                    308: /*
                    309: &System FidoNet Addresses:&
                    310: 
                    311: This is the FidoNet address of this system used to receive NetMail.
                    312: The Main address is also used as the default address for sub-boards.
                    313: Format: &Zone:Net/Node[.Point]&
                    314: */
                    315:                                        k=l=0;
                    316:                                        while(1) {
                    317:                                                for(i=0;i<cfg.total_faddrs && i<MAX_OPTS;i++) {
                    318:                                                        if(i==0)
                    319:                                                                strcpy(str,"Main");
                    320:                                                        else
                    321:                                                                sprintf(str,"AKA %u",i);
                    322:                                                        sprintf(opt[i],"%-8.8s %-16s"
                    323:                                                                ,str,smb_faddrtoa(&cfg.faddr[i],tmp)); }
                    324:                                                opt[i][0]=0;
                    325:                                                j=WIN_RHT|WIN_SAV|WIN_ACT|WIN_INSACT;
                    326:                                                if(cfg.total_faddrs<MAX_OPTS)
                    327:                                                        j|=WIN_INS|WIN_XTR;
                    328:                                                if(cfg.total_faddrs)
                    329:                                                        j|=WIN_DEL;
                    330:                                                i=uifc.list(j,0,0,0,&k,&l
                    331:                                                        ,"System Addresses",opt);
                    332:                                                if(i==-1)
                    333:                                                        break;
                    334:                                                if((i&MSK_ON)==MSK_INS) {
                    335:                                                        i&=MSK_OFF;
                    336: 
                    337:                                                        if(!cfg.total_faddrs)
                    338:                                                                strcpy(str,"1:1/0");
                    339:                                                        else
                    340:                                                                smb_faddrtoa(&cfg.faddr[0],str);
                    341:                                                        if(!uifc.input(WIN_MID|WIN_SAV,0,0,"Address"
                    342:                                                                ,str,25,K_EDIT|K_UPPER))
                    343:                                                                continue;
                    344: 
                    345:                                                        if((cfg.faddr=(faddr_t *)REALLOC(cfg.faddr
                    346:                                 ,sizeof(faddr_t)*(cfg.total_faddrs+1)))==NULL) {
                    347:                                 errormsg(WHERE,ERR_ALLOC,nulstr
                    348:                                     ,sizeof(faddr_t)*cfg.total_faddrs+1);
                    349:                                                                cfg.total_faddrs=0;
                    350:                                                                bail(1);
                    351:                                 continue; }
                    352: 
                    353:                                                        for(j=cfg.total_faddrs;j>i;j--)
                    354:                                 cfg.faddr[j]=cfg.faddr[j-1];
                    355: 
                    356:                                                        cfg.faddr[i]=atofaddr(str);
                    357:                                                        cfg.total_faddrs++;
                    358:                                                        uifc.changes=1;
                    359:                                                        continue; }
                    360:                                                if((i&MSK_ON)==MSK_DEL) {
                    361:                                                        i&=MSK_OFF;
                    362:                                                        cfg.total_faddrs--;
                    363:                                                        while(i<cfg.total_faddrs) {
                    364:                                                                cfg.faddr[i]=cfg.faddr[i+1];
                    365:                                                                i++; }
                    366:                                                        uifc.changes=1;
                    367:                                                        continue; }
                    368:                                                smb_faddrtoa(&cfg.faddr[i],str);
                    369:                                                uifc.input(WIN_MID|WIN_SAV,0,0,"Address"
                    370:                                                        ,str,25,K_EDIT);
                    371:                                                cfg.faddr[i]=atofaddr(str); }
                    372:                     break;
                    373:                                case 1:
                    374:                                        i=0;
                    375:                                        strcpy(opt[0],"Yes");
                    376:                                        strcpy(opt[1],"No");
                    377:                                        opt[2][0]=0;
                    378:                                        SETHELP(WHERE);
                    379: /*
                    380: &Use Default Outbound NetMail Address:&
                    381: 
                    382: If you would like to have a default FidoNet address adding to outbound
                    383: NetMail mail messages that do not have an address specified, select
                    384: &Yes&.
                    385: */
                    386:                                        i=uifc.list(WIN_MID|WIN_SAV,0,0,0,&i,0
                    387:                                                ,"Use Default Outbound NetMail Address",opt);
                    388:                                        if(i==1) {
                    389:                                                if(cfg.dflt_faddr.zone)
                    390:                                                        uifc.changes=1;
                    391:                                                cfg.dflt_faddr.zone=0;
                    392:                                                break; }
                    393:                                        if(i==-1)
                    394:                                                break;
                    395:                                        if(!cfg.dflt_faddr.zone) {
                    396:                                                cfg.dflt_faddr.zone=1;
                    397:                                                uifc.changes=1; }
                    398:                                        smb_faddrtoa(&cfg.dflt_faddr,str);
                    399:                                        SETHELP(WHERE);
                    400: /*
                    401: &Default Outbound FidoNet NetMail Address:&
                    402: 
                    403: If you would like to automatically add a FidoNet address to outbound
                    404: NetMail that does not have an address specified, set this option
                    405: to that address. This is useful for Fido/UUCP gateway mail.
                    406: Format: &Zone:Net/Node[.Point]&
                    407: */
                    408:                                        if(uifc.input(WIN_MID|WIN_SAV,0,0,"Outbound Address"
                    409:                                                ,str,25,K_EDIT)) {
                    410:                                                cfg.dflt_faddr=atofaddr(str);
                    411:                                                uifc.changes=1; }
                    412:                     break;
                    413:                                case 2:
                    414:                                        SETHELP(WHERE);
                    415: /*
                    416: &Default Origin Line:&
                    417: 
                    418: This is the default origin line used for sub-boards networked via
                    419: EchoMail. This origin line can be overridden on a per sub-board basis
                    420: with the sub-board configuration &Network Options...&.
                    421: */
                    422:                                        uifc.input(WIN_MID|WIN_SAV,0,0,"* Origin"
                    423:                                                ,cfg.origline,sizeof(cfg.origline)-1,K_EDIT);
                    424:                     break;
                    425:                                case 3:
                    426:                                        SETHELP(WHERE);
                    427: /*
                    428: &NetMail Semaphore File:&
                    429: 
                    430: This is a filename that will be used as a semaphore (signal) to your
                    431: FidoNet front-end that new NetMail has been created and the messages
                    432: should be re-scanned.
                    433: */
                    434:                                        uifc.input(WIN_MID|WIN_SAV,0,0,"NetMail Semaphore"
                    435:                                                ,cfg.netmail_sem,sizeof(cfg.netmail_sem)-1,K_EDIT);
                    436:                     break;
                    437:                                case 4:
                    438:                                        SETHELP(WHERE);
                    439: /*
                    440: &EchoMail Semaphore File:&
                    441: 
                    442: This is a filename that will be used as a semaphore (signal) to your
                    443: FidoNet front-end that new EchoMail has been created and the messages
                    444: should be re-scanned.
                    445: */
                    446:                                        uifc.input(WIN_MID|WIN_SAV,0,0,"EchoMail Semaphore"
                    447:                                                ,cfg.echomail_sem,sizeof(cfg.echomail_sem)-1,K_EDIT);
                    448:                     break;
                    449:                                case 5:
                    450:                                        SETHELP(WHERE);
                    451: /*
                    452: &Inbound File Directory:&
                    453: 
                    454: This directory is where inbound files are placed. This directory is
                    455: only used when an incoming message has a file attached.
                    456: */
                    457:                                        uifc.input(WIN_MID|WIN_SAV,0,0,"Inbound Files"
                    458:                                                ,cfg.fidofile_dir,sizeof(cfg.fidofile_dir)-1,K_EDIT);
                    459:                     break;
                    460:                                case 6:
                    461:                                        SETHELP(WHERE);
                    462: /*
                    463: &EchoMail Base Directory:&
                    464: 
                    465: This is an optional field used as a base directory for the location
                    466: of EchoMail messages for sub-boards that do not have a specified
                    467: &EchoMail Storage Directory&. If a sub-board does not have a specified
                    468: storage directory for EchoMail, its messages will be imported from and
                    469: exported to a sub-directory off of this base directory. The name of the
                    470: sub-directory is the same as the internal code for the sub-directory.
                    471: 
                    472: If all EchoMail sub-boards have specified EchoMail storage directories,
                    473: this option is not used at all.
                    474: */
                    475:                                        uifc.input(WIN_MID|WIN_SAV,0,0,"EchoMail Base"
                    476:                                                ,cfg.echomail_dir,sizeof(cfg.echomail_dir)-1,K_EDIT);
                    477:                     break;
                    478:                                case 7:
                    479:                                        SETHELP(WHERE);
                    480: /*
                    481: &NetMail Directory:&
                    482: 
                    483: This is the directory where NetMail will be imported from and exported
                    484: to.
                    485: */
                    486:                                        uifc.input(WIN_MID|WIN_SAV,0,0,"NetMail"
                    487:                                                ,cfg.netmail_dir,sizeof(cfg.netmail_dir)-1,K_EDIT);
                    488:                     break;
                    489:                                case 8:
                    490:                                        i=0;
                    491:                                        strcpy(opt[0],"Yes");
                    492:                                        strcpy(opt[1],"No");
                    493:                                        opt[2][0]=0;
                    494:                                        SETHELP(WHERE);
                    495: /*
                    496: &Allow Users to Send NetMail:&
                    497: 
                    498: If you are on a FidoNet style network and want your users to be allowed
                    499: to send NetMail, set this option to &Yes&.
                    500: */
                    501:                                        i=uifc.list(WIN_MID|WIN_SAV,0,0,0,&i,0
                    502:                                                ,"Allow Users to Send NetMail",opt);
                    503:                                        if(!i && !(cfg.netmail_misc&NMAIL_ALLOW)) {
                    504:                                                uifc.changes=1;
                    505:                                                cfg.netmail_misc|=NMAIL_ALLOW; }
                    506:                                        else if(i==1 && cfg.netmail_misc&NMAIL_ALLOW) {
                    507:                                                uifc.changes=1;
                    508:                                                cfg.netmail_misc&=~NMAIL_ALLOW; }
                    509:                                        break;
                    510:                                case 9:
                    511:                                        i=0;
                    512:                                        strcpy(opt[0],"Yes");
                    513:                                        strcpy(opt[1],"No");
                    514:                                        opt[2][0]=0;
                    515:                                        SETHELP(WHERE);
                    516: /*
                    517: &Allow Users to Send NetMail File Attachments:&
                    518: 
                    519: If you are on a FidoNet style network and want your users to be allowed
                    520: to send NetMail file attachments, set this option to &Yes&.
                    521: */
                    522:                                        i=uifc.list(WIN_MID|WIN_SAV,0,0,0,&i,0
                    523:                                                ,"Allow Users to Send NetMail File Attachments",opt);
                    524:                                        if(!i && !(cfg.netmail_misc&NMAIL_FILE)) {
                    525:                                                uifc.changes=1;
                    526:                                                cfg.netmail_misc|=NMAIL_FILE; }
                    527:                                        else if(i==1 && cfg.netmail_misc&NMAIL_FILE) {
                    528:                                                uifc.changes=1;
                    529:                                                cfg.netmail_misc&=~NMAIL_FILE; }
                    530:                     break;
                    531:                                case 10:
                    532:                                        i=1;
                    533:                                        strcpy(opt[0],"Yes");
                    534:                                        strcpy(opt[1],"No");
                    535:                                        opt[2][0]=0;
                    536:                                        SETHELP(WHERE);
                    537: /*
                    538: &Use Aliases in NetMail:&
                    539: 
                    540: If you allow aliases on your system and wish users to have their NetMail
                    541: contain their alias as the &From User&, set this option to &Yes&. If you
                    542: want all NetMail to be sent using users' real names, set this option to
                    543: &No&.
                    544: */
                    545:                                        i=uifc.list(WIN_MID|WIN_SAV,0,0,0,&i,0
                    546:                                                ,"Use Aliases in NetMail",opt);
                    547:                                        if(!i && !(cfg.netmail_misc&NMAIL_ALIAS)) {
                    548:                                                uifc.changes=1;
                    549:                                                cfg.netmail_misc|=NMAIL_ALIAS; }
                    550:                                        else if(i==1 && cfg.netmail_misc&NMAIL_ALIAS) {
                    551:                                                uifc.changes=1;
                    552:                                                cfg.netmail_misc&=~NMAIL_ALIAS; }
                    553:                     break;
                    554:                                case 11:
                    555:                                        i=1;
                    556:                                        strcpy(opt[0],"Yes");
                    557:                                        strcpy(opt[1],"No");
                    558:                                        opt[2][0]=0;
                    559:                                        SETHELP(WHERE);
                    560: /*
                    561: &NetMail Defaults to Crash Status:&
                    562: 
                    563: If you want all NetMail to default to crash (send immediately) status,
                    564: set this option to &Yes&.
                    565: */
                    566:                                        i=uifc.list(WIN_MID|WIN_SAV,0,0,0,&i,0
                    567:                                                ,"NetMail Defaults to Crash Status",opt);
                    568:                                        if(!i && !(cfg.netmail_misc&NMAIL_CRASH)) {
                    569:                                                uifc.changes=1;
                    570:                                                cfg.netmail_misc|=NMAIL_CRASH; }
                    571:                                        else if(i==1 && cfg.netmail_misc&NMAIL_CRASH) {
                    572:                                                uifc.changes=1;
                    573:                                                cfg.netmail_misc&=~NMAIL_CRASH; }
                    574:                     break;
                    575:                                case 12:
                    576:                                        i=1;
                    577:                                        strcpy(opt[0],"Yes");
                    578:                                        strcpy(opt[1],"No");
                    579:                                        opt[2][0]=0;
                    580:                                        SETHELP(WHERE);
                    581: /*
                    582: &NetMail Defaults to Direct Status:&
                    583: 
                    584: If you want all NetMail to default to direct (send directly) status,
                    585: set this option to &Yes&.
                    586: */
                    587:                                        i=uifc.list(WIN_MID|WIN_SAV,0,0,0,&i,0
                    588:                                                ,"NetMail Defaults to Direct Status",opt);
                    589:                                        if(!i && !(cfg.netmail_misc&NMAIL_DIRECT)) {
                    590:                                                uifc.changes=1;
                    591:                                                cfg.netmail_misc|=NMAIL_DIRECT; }
                    592:                                        else if(i==1 && cfg.netmail_misc&NMAIL_DIRECT) {
                    593:                                                uifc.changes=1;
                    594:                                                cfg.netmail_misc&=~NMAIL_DIRECT; }
                    595:                     break;
                    596:                                case 13:
                    597:                                        i=1;
                    598:                                        strcpy(opt[0],"Yes");
                    599:                                        strcpy(opt[1],"No");
                    600:                                        opt[2][0]=0;
                    601:                                        SETHELP(WHERE);
                    602: /*
                    603: &NetMail Defaults to Hold Status:&
                    604: 
                    605: If you want all NetMail to default to hold status, set this option to
                    606: &Yes&.
                    607: */
                    608:                                        i=uifc.list(WIN_MID|WIN_SAV,0,0,0,&i,0
                    609:                                                ,"NetMail Defaults to Hold Status",opt);
                    610:                                        if(!i && !(cfg.netmail_misc&NMAIL_HOLD)) {
                    611:                                                uifc.changes=1;
                    612:                                                cfg.netmail_misc|=NMAIL_HOLD; }
                    613:                                        else if(i==1 && cfg.netmail_misc&NMAIL_HOLD) {
                    614:                                                uifc.changes=1;
                    615:                                                cfg.netmail_misc&=~NMAIL_HOLD; }
                    616:                     break;
                    617:                                case 14:
                    618:                                        i=0;
                    619:                                        strcpy(opt[0],"Yes");
                    620:                                        strcpy(opt[1],"No");
                    621:                                        opt[2][0]=0;
                    622:                                        SETHELP(WHERE);
                    623: /*
                    624: &Kill NetMail After it is Sent:&
                    625: 
                    626: If you want NetMail messages to be deleted after they are successfully
                    627: sent, set this option to &Yes&.
                    628: */
                    629:                                        i=uifc.list(WIN_MID|WIN_SAV,0,0,0,&i,0
                    630:                                                ,"Kill NetMail After it is Sent",opt);
                    631:                                        if(!i && !(cfg.netmail_misc&NMAIL_KILL)) {
                    632:                                                uifc.changes=1;
                    633:                                                cfg.netmail_misc|=NMAIL_KILL; }
                    634:                                        else if(i==1 && cfg.netmail_misc&NMAIL_KILL) {
                    635:                                                uifc.changes=1;
                    636:                                                cfg.netmail_misc&=~NMAIL_KILL; }
                    637:                     break;
                    638:                                case 15:
                    639:                                        ultoa(cfg.netmail_cost,str,10);
                    640:                                        SETHELP(WHERE);
                    641: /*
                    642: &Cost in Credits to Send NetMail:&
                    643: 
                    644: This is the number of credits it will cost your users to send NetMail.
                    645: If you want the sending of NetMail to be free, set this value to &0&.
                    646: */
                    647:                                        uifc.input(WIN_MID|WIN_SAV,0,0
                    648:                                                ,"Cost in Credits to Send NetMail"
                    649:                                                ,str,10,K_EDIT|K_NUMBER);
                    650:                                        cfg.netmail_cost=atol(str);
                    651:                                        break; } } }
                    652:        else if(i==3) {
                    653:                done=0;
                    654:                while(!done) {
                    655:                        i=0;
                    656:                        strcpy(opt[i++],"Network Hubs...");
                    657:                        sprintf(opt[i++],"%-20.20s%-12s","Site Name",cfg.sys_psname);
                    658:                        sprintf(opt[i++],"%-20.20s%-lu","Site Number",cfg.sys_psnum);
                    659:                        opt[i][0]=0;
                    660:                        SETHELP(WHERE);
                    661: /*
                    662: &PostLink Networks:&
                    663: 
                    664: From this menu you can configure PostLink or PCRelay Networks.
                    665: */
                    666:                        i=uifc.list(WIN_ACT|WIN_RHT|WIN_BOT|WIN_CHE,0,0,0,&pnet_dflt,0
                    667:                                ,"PostLink Networks",opt);
                    668:                        uifc.savnum=0;
                    669:                        switch(i) {
                    670:                                case -1:        /* ESC */
                    671:                                        done=1;
                    672:                                        break;
                    673:                                case 1:
                    674:                                        SETHELP(WHERE);
                    675: /*
                    676: &PostLink Site Name:&
                    677: 
                    678: If your system is networked via PostLink or PCRelay, this should be the
                    679: Site Name for your BBS.
                    680: */
                    681:                                        uifc.input(WIN_MID|WIN_SAV,0,0,"Site Name"
                    682:                                                ,cfg.sys_psname,sizeof(cfg.sys_psname)-1,K_UPPER|K_EDIT);
                    683:                                        break;
                    684:                                case 2:
                    685:                                        SETHELP(WHERE);
                    686: /*
                    687: &PostLink Site Number:&
                    688: 
                    689: If your system is networked via PostLink or PCRelay, this should be the
                    690: Site Number for your BBS.
                    691: */
                    692:                                        ultoa(cfg.sys_psnum,str,10);
                    693:                                        uifc.input(WIN_MID|WIN_SAV,0,0,"Site Number"
                    694:                                                ,str,10,K_NUMBER|K_EDIT);
                    695:                                        cfg.sys_psnum=atol(str);
                    696:                     break;
                    697:                                case 0:
                    698:                                        while(1) {
                    699:                                                for(i=0;i<cfg.total_phubs && i<MAX_OPTS;i++)
                    700:                                                        sprintf(opt[i],"%-10.10s",cfg.phub[i]->name);
                    701:                                                opt[i][0]=0;
                    702:                                                i=WIN_ACT|WIN_RHT|WIN_SAV;
                    703:                                                if(cfg.total_phubs<MAX_OPTS)
                    704:                                                        i|=WIN_INS|WIN_INSACT|WIN_XTR;
                    705:                                                if(cfg.total_phubs)
                    706:                                                        i|=WIN_DEL;
                    707:                                                uifc.savnum=0;
                    708:                                                SETHELP(WHERE);
                    709: /*
                    710: &PostLink Network Hubs:&
                    711: 
                    712: This is a list of PostLink and/or PCRelay network hubs that your system
                    713: calls to exchange packets with.
                    714: 
                    715: To add a hub, select the desired location with the arrow keys and hit
                    716:  INS .
                    717: 
                    718: To delete a hub, select it and hit  DEL .
                    719: 
                    720: To configure a hub, select it and hit  ENTER .
                    721: */
                    722:                                                i=uifc.list(i,0,0,0,&phub_dflt,0
                    723:                                                        ,"PostLink Hubs",opt);
                    724:                                                if(i==-1)
                    725:                                                        break;
                    726:                                                if((i&MSK_ON)==MSK_INS) {
                    727:                                                        i&=MSK_OFF;
                    728:                                                        if((cfg.phub=(phub_t **)REALLOC(cfg.phub
                    729:                                 ,sizeof(phub_t *)*(cfg.total_phubs+1)))==NULL) {
                    730:                                 errormsg(WHERE,ERR_ALLOC,nulstr
                    731:                                     ,sizeof(phub_t *)*(cfg.total_phubs+1));
                    732:                                                                cfg.total_phubs=0;
                    733:                                                                bail(1);
                    734:                                 continue; }
                    735: 
                    736:                                                        uifc.savnum=1;
                    737:                                                        SETHELP(WHERE);
                    738: /*
                    739: &Network Hub Site Name:&
                    740: 
                    741: This is the Site Name of this hub. It is used for only for reference.
                    742: */
                    743:                                                        if(uifc.input(WIN_MID|WIN_SAV,0,0
                    744:                                                                ,"Site Name",str,10,K_UPPER)<1)
                    745:                                                                continue;
                    746: 
                    747:                                                        for(j=cfg.total_phubs;j>i;j--)
                    748:                                 cfg.phub[j]=cfg.phub[j-1];
                    749: 
                    750:                                                        if((cfg.phub[i]=(phub_t *)MALLOC(sizeof(phub_t)))
                    751:                                                                ==NULL) {
                    752:                                                                errormsg(WHERE,ERR_ALLOC,nulstr
                    753:                                                                        ,sizeof(phub_t));
                    754:                                                                continue; }
                    755:                                                        memset(cfg.phub[i],0,sizeof(phub_t));
                    756:                                                        strcpy(cfg.phub[i]->name,str);
                    757:                                                        strcpy(cfg.phub[i]->call,"%!pnet");
                    758:                                                        cfg.phub[i]->node=1;
                    759:                                                        cfg.phub[i]->days=0xff; /* all days */
                    760:                                                        cfg.total_phubs++;
                    761:                                                        uifc.changes=1;
                    762:                                                        continue; }
                    763:                                                if((i&MSK_ON)==MSK_DEL) {
                    764:                                                        i&=MSK_OFF;
                    765:                                                        FREE(cfg.phub[i]);
                    766:                                                        cfg.total_phubs--;
                    767:                                                        while(i<cfg.total_phubs) {
                    768:                                                                cfg.phub[i]=cfg.phub[i+1];
                    769:                                                                i++; }
                    770:                                                        uifc.changes=1;
                    771:                                                        continue; }
                    772:                                                phub_edit(i); }
                    773:                     break; } } }
                    774: 
                    775:        else if(i==0) {         /* Internet E-mail */
                    776:                done=0;
                    777:                while(!done) {
                    778:                        i=0;
                    779:                        sprintf(opt[i++],"%-27.27s%s"
                    780:                                ,"System Address",cfg.sys_inetaddr);
                    781:                        sprintf(opt[i++],"%-27.27s%.40s"
                    782:                                ,"Inbound E-mail Semaphore",cfg.smtpmail_sem);
                    783:                        sprintf(opt[i++],"%-27.27s%.40s"
                    784:                                ,"Outbound E-mail Semaphore",cfg.inetmail_sem);
                    785:                        sprintf(opt[i++],"%-27.27s%s"
                    786:                                ,"Allow Sending of E-mail"
                    787:                                ,cfg.inetmail_misc&NMAIL_ALLOW ? "Yes":"No");
                    788:                        sprintf(opt[i++],"%-27.27s%s"
                    789:                                ,"Allow File Attachments"
                    790:                                ,cfg.inetmail_misc&NMAIL_FILE ? "Yes":"No");
                    791:                        sprintf(opt[i++],"%-27.27s%s"
                    792:                                ,"Send E-mail Using Alias"
                    793:                                ,cfg.inetmail_misc&NMAIL_ALIAS ? "Yes":"No");
                    794:                        sprintf(opt[i++],"%-27.27s%lu"
                    795:                                ,"Cost to Send E-mail",cfg.inetmail_cost);
                    796:                        opt[i][0]=0;
                    797:                        SETHELP(WHERE);
                    798: /*
                    799: &Internet E-mail:&
                    800: 
                    801: This menu contains configuration options that pertain specifically to
                    802: Internet E-mail.
                    803: */
                    804:                        i=uifc.list(WIN_ACT|WIN_MID|WIN_CHE,0,0,60,&inet_dflt,0
                    805:                                ,"Internet E-mail",opt);
                    806:                        uifc.savnum=0;
                    807:                        switch(i) {
                    808:                                case -1:        /* ESC */
                    809:                                        done=1;
                    810:                                        break;
                    811:                                case 0:
                    812:                                        SETHELP(WHERE);
                    813: /*
                    814: &Sytem Internet Address:&
                    815: 
                    816: Enter your system's Internet address (hostname or IP address) here
                    817: (e.g. &joesbbs.com&).
                    818: */
                    819:                                        uifc.input(WIN_MID|WIN_SAV,0,0,""
                    820:                                                ,cfg.sys_inetaddr,sizeof(cfg.sys_inetaddr)-1,K_EDIT);
                    821:                     break;
                    822:                                case 1:
                    823:                                        SETHELP(WHERE);
                    824: /*
                    825: &Inbound Internet E-mail Semaphore File:&
                    826: 
                    827: This is a filename that will be used as a semaphore (signal) to any
                    828: external Internet e-mail processors that new mail has been received
                    829: and the message base should be re-scanned.
                    830: */
                    831:                                        uifc.input(WIN_MID|WIN_SAV,0,0,"Inbound Semaphore"
                    832:                                                ,cfg.smtpmail_sem,sizeof(cfg.smtpmail_sem)-1,K_EDIT);
                    833:                     break;
                    834:                                case 2:
                    835:                                        SETHELP(WHERE);
                    836: /*
                    837: &Outbound Internet E-mail Semaphore File:&
                    838: 
                    839: This is a filename that will be used as a semaphore (signal) to any
                    840: external Internet gateways (if supported) that new mail has been created
                    841: and the message base should be re-scanned.
                    842: */
                    843:                                        uifc.input(WIN_MID|WIN_SAV,0,0,"Outbound Semaphore"
                    844:                                                ,cfg.inetmail_sem,sizeof(cfg.inetmail_sem)-1,K_EDIT);
                    845:                     break;
                    846:                                case 3:
                    847:                                        i=0;
                    848:                                        strcpy(opt[0],"Yes");
                    849:                                        strcpy(opt[1],"No");
                    850:                                        opt[2][0]=0;
                    851:                                        SETHELP(WHERE);
                    852: /*
                    853: &Allow Users to Send Internet E-mail:&
                    854: 
                    855: If you want your users to be allowed to send Internet E-mail, set this
                    856: option to &Yes&.
                    857: */
                    858:                                        i=uifc.list(WIN_MID|WIN_SAV,0,0,0,&i,0
                    859:                                                ,"Allow Users to Send E-mail",opt);
                    860:                                        if(!i && !(cfg.inetmail_misc&NMAIL_ALLOW)) {
                    861:                                                uifc.changes=1;
                    862:                                                cfg.inetmail_misc|=NMAIL_ALLOW; }
                    863:                                        else if(i==1 && cfg.inetmail_misc&NMAIL_ALLOW) {
                    864:                                                uifc.changes=1;
                    865:                                                cfg.inetmail_misc&=~NMAIL_ALLOW; }
                    866:                                        break;
                    867:                                case 4:
                    868:                                        i=0;
                    869:                                        strcpy(opt[0],"Yes");
                    870:                                        strcpy(opt[1],"No");
                    871:                                        opt[2][0]=0;
                    872:                                        SETHELP(WHERE);
                    873: /*
                    874: &Allow Users to Send Internet E-mail File Attachments:&
                    875: 
                    876: If you want your users to be allowed to send Internet E-mail with file
                    877: attachments, set this option to &Yes&.
                    878: */
                    879:                                        i=uifc.list(WIN_MID|WIN_SAV,0,0,0,&i,0
                    880:                                                ,"Allow Users to Send E-mail with File Attachments",opt);
                    881:                                        if(!i && !(cfg.inetmail_misc&NMAIL_FILE)) {
                    882:                                                uifc.changes=1;
                    883:                                                cfg.inetmail_misc|=NMAIL_FILE; }
                    884:                                        else if(i==1 && cfg.inetmail_misc&NMAIL_FILE) {
                    885:                                                uifc.changes=1;
                    886:                                                cfg.inetmail_misc&=~NMAIL_FILE; }
                    887:                     break;
                    888:                                case 5:
                    889:                                        i=1;
                    890:                                        strcpy(opt[0],"Yes");
                    891:                                        strcpy(opt[1],"No");
                    892:                                        opt[2][0]=0;
                    893:                                        SETHELP(WHERE);
                    894: /*
                    895: &Use Aliases in Internet E-mail:&
                    896: 
                    897: If you allow aliases on your system and wish users to have their
                    898: Internet E-mail contain their alias as the &From User&, set this option to
                    899: &Yes&. If you want all E-mail to be sent using users' real names, set this
                    900: option to &No&.
                    901: */
                    902:                                        i=uifc.list(WIN_MID|WIN_SAV,0,0,0,&i,0
                    903:                                                ,"Use Aliases in Internet E-mail",opt);
                    904:                                        if(!i && !(cfg.inetmail_misc&NMAIL_ALIAS)) {
                    905:                                                uifc.changes=1;
                    906:                                                cfg.inetmail_misc|=NMAIL_ALIAS; }
                    907:                                        else if(i==1 && cfg.inetmail_misc&NMAIL_ALIAS) {
                    908:                                                uifc.changes=1;
                    909:                                                cfg.inetmail_misc&=~NMAIL_ALIAS; }
                    910:                                        break;
                    911:                                case 6:
                    912:                                        ultoa(cfg.inetmail_cost,str,10);
                    913:                                        SETHELP(WHERE);
                    914: /*
                    915: &Cost in Credits to Send Internet E-mail:&
                    916: 
                    917: This is the number of credits it will cost your users to send Internet
                    918: E-mail. If you want the sending of Internet E-mail to be free, set this
                    919: value to &0&.
                    920: */
                    921:                                        uifc.input(WIN_MID|WIN_SAV,0,0
                    922:                                                ,"Cost in Credits to Send Internet E-mail"
                    923:                                                ,str,10,K_EDIT|K_NUMBER);
                    924:                                        cfg.inetmail_cost=atol(str);
                    925:                                        break; } } }
                    926: 
                    927:        else { /* ESC */
                    928:                i=save_changes(WIN_MID|WIN_SAV);
                    929:                if(i==-1)
                    930:                        continue;
                    931:                if(!i) {
                    932:                        write_msgs_cfg(&cfg,backup_level);
                    933:             refresh_cfg(&cfg);
                    934:         }
                    935:                break;
                    936:         }
                    937:     }
                    938: }
                    939: 
                    940: void qhub_edit(int num)
                    941: {
                    942:        static int qhub_dflt;
                    943:        char *p,done=0,str[256];
                    944:        int i,j;
                    945: 
                    946: while(!done) {
                    947:        i=0;
                    948:        sprintf(opt[i++],"%-27.27s%s","Hub System ID",cfg.qhub[num]->id);
                    949:        sprintf(opt[i++],"%-27.27s%.40s","Pack Command Line",cfg.qhub[num]->pack);
                    950:        sprintf(opt[i++],"%-27.27s%.40s","Unpack Command Line",cfg.qhub[num]->unpack);
                    951:        sprintf(opt[i++],"%-27.27s%.40s","Call-out Command Line",cfg.qhub[num]->call);
                    952:        sprintf(opt[i++],"%-27.27s%u","Call-out Node",cfg.qhub[num]->node);
                    953:        sprintf(opt[i++],"%-27.27s%s","Call-out Days",daystr(cfg.qhub[num]->days));
                    954:        if(cfg.qhub[num]->freq) {
                    955:                sprintf(str,"%u times a day",1440/cfg.qhub[num]->freq);
                    956:                sprintf(opt[i++],"%-27.27s%s","Call-out Frequency",str); }
                    957:        else {
                    958:                sprintf(str,"%2.2u:%2.2u",cfg.qhub[num]->time/60,cfg.qhub[num]->time%60);
                    959:                sprintf(opt[i++],"%-27.27s%s","Call-out Time",str); }
                    960:        strcpy(opt[i++],"Networked Sub-boards...");
                    961:        opt[i][0]=0;
                    962:        sprintf(str,"%s Network Hub",cfg.qhub[num]->id);
                    963:        uifc.savnum=1;
                    964:        SETHELP(WHERE);
                    965: /*
                    966: &QWK Network Hub Configuration:&
                    967: 
                    968: This menu allows you to configure options specific to this QWK network
                    969: hub.
                    970: */
                    971:        switch(uifc.list(WIN_ACT|WIN_MID|WIN_SAV,0,0,0,&qhub_dflt,0
                    972:                ,str,opt)) {
                    973:                case -1:
                    974:                        done=1;
                    975:                        break;
                    976:                case 0:
                    977:                        SETHELP(WHERE);
                    978: /*
                    979: &QWK Network Hub System ID:&
                    980: 
                    981: This is the QWK System ID of this hub. It is used for incoming and
                    982: outgoing network packets and must be accurate.
                    983: */
                    984:                        strcpy(str,cfg.qhub[num]->id);  /* save */
                    985:                        if(!uifc.input(WIN_MID|WIN_SAV,0,0,"QWK Network Hub System ID"
                    986:                                ,cfg.qhub[num]->id,LEN_QWKID,K_UPPER|K_EDIT))
                    987:                                strcpy(cfg.qhub[num]->id,str);
                    988:                        break;
                    989:                case 1:
                    990:                        SETHELP(WHERE);
                    991: /*
                    992: &REP Packet Creation Command:&
                    993: 
                    994: This is the command line to use to create (compress) REP packets for
                    995: this QWK network hub.
                    996: */
                    997:                        uifc.input(WIN_MID|WIN_SAV,0,0,""
                    998:                                ,cfg.qhub[num]->pack,sizeof(cfg.qhub[num]->pack)-1,K_EDIT);
                    999:                        break;
                   1000:                case 2:
                   1001:                        SETHELP(WHERE);
                   1002: /*
                   1003: &QWK Packet Extraction Command:&
                   1004: 
                   1005: This is the command line to use to extract (decompress) QWK packets from
                   1006: this QWK network hub.
                   1007: */
                   1008:                        uifc.input(WIN_MID|WIN_SAV,0,0,""
                   1009:                                ,cfg.qhub[num]->unpack,sizeof(cfg.qhub[num]->unpack)-1,K_EDIT);
                   1010:                        break;
                   1011:                case 3:
                   1012:                        SETHELP(WHERE);
                   1013: /*
                   1014: &QWK Network Hub Call-out Command Line:&
                   1015: 
                   1016: This is the command line to use to initiate a call-out to this QWK
                   1017: network hub.
                   1018: */
                   1019:                        uifc.input(WIN_MID|WIN_SAV,0,0,""
                   1020:                                ,cfg.qhub[num]->call,sizeof(cfg.qhub[num]->call)-1,K_EDIT);
                   1021:                        break;
                   1022:                case 4:
                   1023:                        sprintf(str,"%u",cfg.qhub[num]->node);
                   1024:                        SETHELP(WHERE);
                   1025: /*
                   1026: &Node to Perform Call-out:&
                   1027: 
                   1028: This is the number of the node to perform the call-out for this QWK
                   1029: network hub.
                   1030: */
                   1031:                        uifc.input(WIN_MID|WIN_SAV,0,0
                   1032:                                ,"Node to Perform Call-out",str,3,K_EDIT|K_NUMBER);
                   1033:                        cfg.qhub[num]->node=atoi(str);
                   1034:                        break;
                   1035:                case 5:
                   1036:                        j=0;
                   1037:                        while(1) {
                   1038:                                for(i=0;i<7;i++)
                   1039:                                        sprintf(opt[i],"%s        %s"
                   1040:                                                ,wday[i],(cfg.qhub[num]->days&(1<<i)) ? "Yes":"No");
                   1041:                                opt[i][0]=0;
                   1042:                                uifc.savnum=2;
                   1043:                                SETHELP(WHERE);
                   1044: /*
                   1045: &Days to Perform Call-out:&
                   1046: 
                   1047: These are the days that a call-out will be performed for this QWK
                   1048: network hub.
                   1049: */
                   1050:                                i=uifc.list(WIN_MID,0,0,0,&j,0
                   1051:                                        ,"Days to Perform Call-out",opt);
                   1052:                                if(i==-1)
                   1053:                                        break;
                   1054:                                cfg.qhub[num]->days^=(1<<i);
                   1055:                                uifc.changes=1; }
                   1056:                        break;
                   1057:                case 6:
                   1058:                        i=1;
                   1059:                        strcpy(opt[0],"Yes");
                   1060:                        strcpy(opt[1],"No");
                   1061:                        opt[2][0]=0;
                   1062:                        uifc.savnum=2;
                   1063:                        SETHELP(WHERE);
                   1064: /*
                   1065: &Perform Call-out at a Specific Time:&
                   1066: 
                   1067: If you want the system call this QWK network hub at a specific time,
                   1068: set this option to &Yes&. If you want the system to call this network
                   1069: hub more than once a day at predetermined intervals, set this option to
                   1070: &No&.
                   1071: */
                   1072:                        i=uifc.list(WIN_MID|WIN_SAV,0,0,0,&i,0
                   1073:                                ,"Perform Call-out at a Specific Time",opt);
                   1074:                        if(i==0) {
                   1075:                                sprintf(str,"%2.2u:%2.2u",cfg.qhub[num]->time/60
                   1076:                                        ,cfg.qhub[num]->time%60);
                   1077:                                SETHELP(WHERE);
                   1078: /*
                   1079: &Time to Perform Call-out:&
                   1080: 
                   1081: This is the time (in 24 hour HH:MM format) to perform the call-out to
                   1082: this QWK network hub.
                   1083: */
                   1084:                                if(uifc.input(WIN_MID|WIN_SAV,0,0
                   1085:                                        ,"Time to Perform Call-out (HH:MM)"
                   1086:                                        ,str,5,K_UPPER|K_EDIT)>0) {
                   1087:                                        cfg.qhub[num]->freq=0;
                   1088:                                        cfg.qhub[num]->time=atoi(str)*60;
                   1089:                                        if((p=strchr(str,':'))!=NULL)
                   1090:                                                cfg.qhub[num]->time+=atoi(p+1); } }
                   1091:                        else if(i==1) {
                   1092:                                sprintf(str,"%u",cfg.qhub[num]->freq
                   1093:                                        && cfg.qhub[num]->freq<=1440 ? 1440/cfg.qhub[num]->freq : 0);
                   1094:                                SETHELP(WHERE);
                   1095: /*
                   1096: &Number of Call-outs Per Day:&
                   1097: 
                   1098: This is the maximum number of times the system will perform a call-out
                   1099: per day to this QWK network hub. This value is actually converted by
                   1100: Synchronet into minutes between call-outs and when the BBS is idle
                   1101: and this number of minutes since the last call-out is reached, it will
                   1102: perform a call-out.
                   1103: */
                   1104:                                if(uifc.input(WIN_MID|WIN_SAV,0,0
                   1105:                                        ,"Number of Call-outs Per Day"
                   1106:                                        ,str,4,K_NUMBER|K_EDIT)>0) {
                   1107:                                        cfg.qhub[num]->time=0;
                   1108:                                        i=atoi(str);
                   1109:                                        if(i && i<=1440)
                   1110:                                                cfg.qhub[num]->freq=1440/i;
                   1111:                                        else
                   1112:                                                cfg.qhub[num]->freq=0; } }
                   1113:                        break;
                   1114:                case 7:
                   1115:                        qhub_sub_edit(num);
                   1116:                        break; } }
                   1117: }
                   1118: 
                   1119: void qhub_sub_edit(uint num)
                   1120: {
                   1121:        char str[256];
                   1122:        int j,k,l,m,n,bar=0;
                   1123: 
                   1124: k=0;
                   1125: while(1) {
                   1126:        for(j=0;j<cfg.qhub[num]->subs;j++)
                   1127:                sprintf(opt[j],"%-5u %-*.*s %-*.*s"
                   1128:                        ,cfg.qhub[num]->conf[j]
                   1129:                        ,LEN_GSNAME,LEN_GSNAME
                   1130:                        ,cfg.grp[cfg.sub[cfg.qhub[num]->sub[j]]->grp]->sname
                   1131:                        ,LEN_SSNAME,LEN_SSNAME
                   1132:                        ,cfg.sub[cfg.qhub[num]->sub[j]]->sname);
                   1133:        opt[j][0]=0;
                   1134:        uifc.savnum=2;
                   1135:        j=WIN_BOT|WIN_SAV|WIN_ACT;
                   1136:        if(cfg.qhub[num]->subs<MAX_OPTS)
                   1137:                j|=WIN_INS|WIN_INSACT|WIN_XTR;
                   1138:        if(cfg.qhub[num]->subs)
                   1139:                j|=WIN_DEL;
                   1140:        SETHELP(WHERE);
                   1141: /*
                   1142: &QWK Networked Sub-boards:&
                   1143: 
                   1144: This is a list of the sub-boards that are networked with this QWK
                   1145: network hub.
                   1146: 
                   1147: To add a sub-board, select the desired location and hit  INS .
                   1148: 
                   1149: To remove a sub-board, select it and hit  DEL .
                   1150: 
                   1151: To configure a sub-board for this QWK network hub, select it and hit
                   1152:  ENTER .
                   1153: */
                   1154:        j=uifc.list(j,0,0,0,&k,&bar
                   1155:                ,"Networked Sub-boards",opt);
                   1156:        if(j==-1)
                   1157:                break;
                   1158:        if((j&MSK_ON)==MSK_INS) {
                   1159:                j&=MSK_OFF;
                   1160:                uifc.savnum=3;
                   1161:                if((l=getsub())==-1)
                   1162:                        continue;
                   1163:                uifc.savnum=3;
                   1164:                SETHELP(WHERE);
                   1165: /*
                   1166: &Conference Number on Hub:&
                   1167: 
                   1168: This is the number of the conference on the QWK network hub, that this
                   1169: sub-board is networked with. On Synchronet systems, this number is
                   1170: derived by multiplying the group number by 10 and adding the sub-board
                   1171: number. For example, group 2, sub-board 3, is conference number 203.
                   1172: 
                   1173: It is important to understand that this is &NOT& the conference number of
                   1174: this sub-board on your system. It is the number of the conference this
                   1175: sub-board is networked with on this &QWK network hub&.
                   1176: */
                   1177:                if(uifc.input(WIN_MID|WIN_SAV,0,0
                   1178:                        ,"Conference Number on Hub"
                   1179:                        ,str,5,K_NUMBER)<1)
                   1180:                        continue;
                   1181:                strcpy(opt[0],"Strip out");
                   1182:                strcpy(opt[1],"Leave in");
                   1183:                strcpy(opt[2],"Expand to ANSI");
                   1184:                opt[3][0]=0;
                   1185:                m=0;
                   1186:                SETHELP(WHERE);
                   1187: /*
                   1188: &Ctrl-A Codes:&
                   1189: 
                   1190: You are being prompted for the method of handling Ctrl-A attribute codes
                   1191: generated by Synchronet. If this QWK network hub is a Synchronet BBS,
                   1192: set this option to &Leave in&. If the QWK network hub is not a Synchronet
                   1193: BBS, but allows ANSI escape sequences in messages, set this option to
                   1194: &Expand to ANSI&. If the QWK network hub is not a Synchronet BBS and does
                   1195: not support ANSI escape sequences in messages (or you're not sure), set
                   1196: this option to &Strip out&.
                   1197: */
                   1198:                if((m=uifc.list(WIN_MID|WIN_SAV,0,0,0,&m,0
                   1199:                        ,"Ctrl-A Codes",opt))==-1)
                   1200:                        continue;
                   1201:                if((cfg.qhub[num]->sub=(ushort *)REALLOC(cfg.qhub[num]->sub
                   1202:                        ,sizeof(ushort *)*(cfg.qhub[num]->subs+1)))==NULL
                   1203:                || (cfg.qhub[num]->conf=(ushort *)REALLOC(cfg.qhub[num]->conf
                   1204:             ,sizeof(ushort *)*(cfg.qhub[num]->subs+1)))==NULL
                   1205:                || (cfg.qhub[num]->mode=(uchar *)REALLOC(cfg.qhub[num]->mode
                   1206:                        ,sizeof(uchar *)*(cfg.qhub[num]->subs+1)))==NULL) {
                   1207:                        errormsg(WHERE,ERR_ALLOC,nulstr,cfg.qhub[num]->subs+1);
                   1208:                        continue; }
                   1209:                if(cfg.qhub[num]->subs)                           /* insert */
                   1210:                        for(n=cfg.qhub[num]->subs;n>j;n--) {
                   1211:                                cfg.qhub[num]->sub[n]=cfg.qhub[num]->sub[n-1];
                   1212:                                cfg.qhub[num]->conf[n]=cfg.qhub[num]->conf[n-1];
                   1213:                                cfg.qhub[num]->mode[n]=cfg.qhub[num]->mode[n-1]; }
                   1214:                if(!m)
                   1215:                        cfg.qhub[num]->mode[j]=A_STRIP;
                   1216:                else if(m==1)
                   1217:                        cfg.qhub[num]->mode[j]=A_LEAVE;
                   1218:                else
                   1219:                        cfg.qhub[num]->mode[j]=A_EXPAND;
                   1220:                cfg.qhub[num]->sub[j]=l;
                   1221:                cfg.qhub[num]->conf[j]=atoi(str);
                   1222:                cfg.qhub[num]->subs++;
                   1223:                uifc.changes=1;
                   1224:                continue; }
                   1225:        if((j&MSK_ON)==MSK_DEL) {
                   1226:                j&=MSK_OFF;
                   1227:                cfg.qhub[num]->subs--;
                   1228:                while(j<cfg.qhub[num]->subs) {
                   1229:                        cfg.qhub[num]->sub[j]=cfg.qhub[num]->sub[j+1];
                   1230:                        cfg.qhub[num]->mode[j]=cfg.qhub[num]->mode[j+1];
                   1231:                        cfg.qhub[num]->conf[j]=cfg.qhub[num]->conf[j+1];
                   1232:                        j++; }
                   1233:                uifc.changes=1;
                   1234:                continue; }
                   1235:        l=0;
                   1236:        while(1) {
                   1237:                n=0;
                   1238:                sprintf(opt[n++],"%-22.22s%.*s %.*s"
                   1239:                        ,"Sub-board"
                   1240:                        ,LEN_GSNAME
                   1241:                        ,cfg.grp[cfg.sub[cfg.qhub[num]->sub[j]]->grp]->sname
                   1242:                        ,LEN_SSNAME
                   1243:                        ,cfg.sub[cfg.qhub[num]->sub[j]]->sname);
                   1244:                sprintf(opt[n++],"%-22.22s%u"
                   1245:                        ,"Conference Number",cfg.qhub[num]->conf[j]);
                   1246:                sprintf(opt[n++],"%-22.22s%s"
                   1247:                        ,"Ctrl-A Codes",cfg.qhub[num]->mode[j]==A_STRIP ?
                   1248:                        "Strip out" : cfg.qhub[num]->mode[j]==A_LEAVE ?
                   1249:                        "Leave in" : "Expand to ANSI");
                   1250:                opt[n][0]=0;
                   1251:                uifc.savnum=3;
                   1252:                SETHELP(WHERE);
                   1253: /*
                   1254: &QWK Netted Sub-board:&
                   1255: 
                   1256: You are configuring the options for this sub-board for this QWK network
                   1257: hub.
                   1258: */
                   1259:                l=uifc.list(WIN_MID|WIN_SAV|WIN_ACT,0,0,
                   1260:                        22+LEN_GSNAME+LEN_SSNAME,&l,0
                   1261:                        ,"Netted Sub-board",opt);
                   1262:                if(l==-1)
                   1263:                        break;
                   1264:                if(!l) {
                   1265:                        uifc.savnum=4;
                   1266:                        m=getsub();
                   1267:                        if(m!=-1) {
                   1268:                                cfg.qhub[num]->sub[j]=m;
                   1269:                                uifc.changes=1; } }
                   1270:                else if(l==1) {
                   1271:                        uifc.savnum=4;
                   1272:                        SETHELP(WHERE);
                   1273: /*
                   1274: &Conference Number on Hub:&
                   1275: 
                   1276: This is the number of the conference on the QWK network hub, that this
                   1277: sub-board is networked with. On Synchronet systems, this number is
                   1278: derived by multiplying the group number by 10 and adding the sub-board
                   1279: number. For example, group 2, sub-board 3, is conference number 203.
                   1280: 
                   1281: It is important to understand that this is &NOT& the conference number of
                   1282: this sub-board on your system. It is the number of the conference this
                   1283: sub-board is networked with on this &QWK network hub&.
                   1284: */
                   1285:                        if(uifc.input(WIN_MID|WIN_SAV,0,0
                   1286:                                ,"Conference Number on Hub"
                   1287:                                ,str,5,K_NUMBER)>0)
                   1288:                                cfg.qhub[num]->conf[j]=atoi(str); }
                   1289:                else if(l==2) {
                   1290:                        strcpy(opt[0],"Strip out");
                   1291:                        strcpy(opt[1],"Leave in");
                   1292:                        strcpy(opt[2],"Expand to ANSI");
                   1293:                        opt[3][0]=0;
                   1294:                        m=0;
                   1295:                        uifc.savnum=4;
                   1296:                        SETHELP(WHERE);
                   1297: /*
                   1298: &Ctrl-A Codes:&
                   1299: 
                   1300: You are being prompted for the method of handling Ctrl-A attribute codes
                   1301: generated by Synchronet. If this QWK network hub is a Synchronet BBS,
                   1302: set this option to &Leave in&. If the QWK network hub is not a Synchronet
                   1303: BBS, but allows ANSI escape sequences in messages, set this option to
                   1304: &Expand to ANSI&. If the QWK network hub is not a Synchronet BBS and does
                   1305: not support ANSI escape sequences in messages (or you're not sure), set
                   1306: this option to &Strip out&.
                   1307: */
                   1308:                        m=uifc.list(WIN_MID|WIN_SAV,0,0,0,&m,0
                   1309:                                ,"Ctrl-A Codes",opt);
                   1310:                        uifc.changes=1;
                   1311:                        if(!m)
                   1312:                                cfg.qhub[num]->mode[j]=A_STRIP;
                   1313:                        else if(m==1)
                   1314:                                cfg.qhub[num]->mode[j]=A_LEAVE;
                   1315:                        else if(m==2)
                   1316:                                cfg.qhub[num]->mode[j]=A_EXPAND; } } }
                   1317: }
                   1318: 
                   1319: void phub_edit(int num)
                   1320: {
                   1321:        static int phub_dflt;
                   1322:        char *p,done=0,str[256];
                   1323:        int i,j;
                   1324: 
                   1325: while(!done) {
                   1326:        i=0;
                   1327:        sprintf(opt[i++],"%-27.27s%s","Hub Site Name",cfg.phub[num]->name);
                   1328:        sprintf(opt[i++],"%-27.27s%.40s","Call-out Command Line",cfg.phub[num]->call);
                   1329:        sprintf(opt[i++],"%-27.27s%u","Call-out Node",cfg.phub[num]->node);
                   1330:        sprintf(opt[i++],"%-27.27s%s","Call-out Days",daystr(cfg.phub[num]->days));
                   1331:        if(cfg.phub[num]->freq) {
                   1332:                sprintf(str,"%u times a day",1440/cfg.phub[num]->freq);
                   1333:                sprintf(opt[i++],"%-27.27s%s","Call-out Frequency",str); }
                   1334:        else {
                   1335:                sprintf(str,"%2.2u:%2.2u",cfg.phub[num]->time/60
                   1336:                        ,cfg.phub[num]->time%60);
                   1337:                sprintf(opt[i++],"%-27.27s%s","Call-out Time",str); }
                   1338:        opt[i][0]=0;
                   1339:        sprintf(str,"%s Network Hub",cfg.phub[num]->name);
                   1340:        uifc.savnum=1;
                   1341:        SETHELP(WHERE);
                   1342: /*
                   1343: &PostLink Network Hub Configuration:&
                   1344: 
                   1345: This menu allows you to configure options specific to this network hub.
                   1346: */
                   1347:        switch(uifc.list(WIN_ACT|WIN_MID|WIN_SAV,0,0,0,&phub_dflt,0
                   1348:                ,str,opt)) {
                   1349:                case -1:
                   1350:                        done=1;
                   1351:                        break;
                   1352:                case 0:
                   1353:                        SETHELP(WHERE);
                   1354: /*
                   1355: &Network Hub Site Name:&
                   1356: 
                   1357: This is the Site Name of this hub. It is used for only for reference.
                   1358: */
                   1359:                        strcpy(str,cfg.phub[num]->name);        /* save */
                   1360:                        if(!uifc.input(WIN_MID|WIN_SAV,0,0,"Hub Site Name"
                   1361:                                ,cfg.phub[num]->name,sizeof(cfg.phub[num]->name)-1,K_UPPER|K_EDIT))
                   1362:                                strcpy(cfg.phub[num]->name,str);        /* restore */
                   1363:                        break;
                   1364:                case 1:
                   1365:                        SETHELP(WHERE);
                   1366: /*
                   1367: &Network Hub Call-out Command Line:&
                   1368: 
                   1369: This is the command line to use to initiate a call-out to this network
                   1370: hub.
                   1371: */
                   1372:                        uifc.input(WIN_MID|WIN_SAV,0,0,"Call-out Command"
                   1373:                                ,cfg.phub[num]->call,sizeof(cfg.phub[num]->call)-1,K_EDIT);
                   1374:                        break;
                   1375:                case 2:
                   1376:                        sprintf(str,"%u",cfg.phub[num]->node);
                   1377:                        SETHELP(WHERE);
                   1378: /*
                   1379: &Node to Perform Call-out:&
                   1380: 
                   1381: This is the number of the node to perform the call-out for this network
                   1382: hub.
                   1383: */
                   1384:                        uifc.input(WIN_MID|WIN_SAV,0,0
                   1385:                                ,"Node to Perform Call-out",str,3,K_EDIT|K_NUMBER);
                   1386:                        cfg.phub[num]->node=atoi(str);
                   1387:                        break;
                   1388:                case 3:
                   1389:                        j=0;
                   1390:                        while(1) {
                   1391:                                for(i=0;i<7;i++)
                   1392:                                        sprintf(opt[i],"%s        %s"
                   1393:                                                ,wday[i],(cfg.phub[num]->days&(1<<i)) ? "Yes":"No");
                   1394:                                opt[i][0]=0;
                   1395:                                uifc.savnum=2;
                   1396:                                SETHELP(WHERE);
                   1397: /*
                   1398: &Days to Perform Call-out:&
                   1399: 
                   1400: These are the days that a call-out will be performed for this network
                   1401: hub.
                   1402: */
                   1403:                                i=uifc.list(WIN_MID|WIN_SAV,0,0,0,&j,0
                   1404:                                        ,"Days to Perform Call-out",opt);
                   1405:                                if(i==-1)
                   1406:                                        break;
                   1407:                                cfg.phub[num]->days^=(1<<i);
                   1408:                                uifc.changes=1; }
                   1409:                        break;
                   1410:                case 4:
                   1411:                        i=1;
                   1412:                        strcpy(opt[0],"Yes");
                   1413:                        strcpy(opt[1],"No");
                   1414:                        opt[2][0]=0;
                   1415:                        uifc.savnum=2;
                   1416:                        SETHELP(WHERE);
                   1417: /*
                   1418: &Perform Call-out at a Specific Time:&
                   1419: 
                   1420: If you want the system call this network hub at a specific time, set
                   1421: this option to &Yes&. If you want the system to call this hub more than
                   1422: once a day at predetermined intervals, set this option to &No&.
                   1423: */
                   1424:                        i=uifc.list(WIN_MID|WIN_SAV,0,0,0,&i,0
                   1425:                                ,"Perform Call-out at a Specific Time",opt);
                   1426:                        if(i==0) {
                   1427:                                sprintf(str,"%2.2u:%2.2u",cfg.phub[num]->time/60
                   1428:                                        ,cfg.phub[num]->time%60);
                   1429:                                SETHELP(WHERE);
                   1430: /*
                   1431: &Time to Perform Call-out:&
                   1432: 
                   1433: This is the time (in 24 hour HH:MM format) to perform the call-out to
                   1434: this network hub.
                   1435: */
                   1436:                                if(uifc.input(WIN_MID|WIN_SAV,0,0
                   1437:                                        ,"Time to Perform Call-out (HH:MM)"
                   1438:                                        ,str,5,K_UPPER|K_EDIT)>0) {
                   1439:                                        cfg.phub[num]->freq=0;
                   1440:                                        cfg.phub[num]->time=atoi(str)*60;
                   1441:                                        if((p=strchr(str,':'))!=NULL)
                   1442:                                                cfg.phub[num]->time+=atoi(p+1); } }
                   1443:                        else if(i==1) {
                   1444:                                sprintf(str,"%u",cfg.phub[num]->freq
                   1445:                                        && cfg.phub[num]->freq<=1440 ? 1440/cfg.phub[num]->freq : 0);
                   1446:                                SETHELP(WHERE);
                   1447: /*
                   1448: &Number of Call-outs Per Day:&
                   1449: 
                   1450: This is the maximum number of times the system will perform a call-out
                   1451: per day to this network hub. This value is actually converted by
                   1452: Synchronet into minutes between call-outs and when the BBS is idle
                   1453: and this number of minutes since the last call-out is reached, it will
                   1454: perform a call-out.
                   1455: */
                   1456:                                if(uifc.input(WIN_MID|WIN_SAV,0,0
                   1457:                                        ,"Number of Call-outs Per Day"
                   1458:                                        ,str,4,K_NUMBER|K_EDIT)>0) {
                   1459:                                        cfg.phub[num]->time=0;
                   1460:                                        i=atoi(str);
                   1461:                                        if(i && i<=1440)
                   1462:                                                cfg.phub[num]->freq=1440/i;
                   1463:                                        else
                   1464:                                                cfg.phub[num]->freq=0; } }
                   1465:                        break; } }
                   1466: }
                   1467: 
                   1468: char *daystr(char days)
                   1469: {
                   1470:        static char str[256];
                   1471:        int i;
                   1472: 
                   1473:        days&=0x7f;
                   1474: 
                   1475:        if(days==0)             return("None");
                   1476: 
                   1477:        if(days==0x7f)  return("All");
                   1478: 
                   1479:        str[0]=0;
                   1480:        for(i=0;i<7;i++) {
                   1481:                if(days&(1<<i)) {
                   1482:                        strcat(str,wday[i]);
                   1483:                        strcat(str," "); 
                   1484:                }
                   1485:        }
                   1486:        return(str);
                   1487: }

unix.superglobalmegacorp.com

This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.