Annotation of sbbs/sbbs2/scfg/scfgsub.c, revision 1.1.1.1

1.1       root        1: #line 2 "SCFGSUB.C"
                      2: 
                      3: /* Developed 1990-1997 by Rob Swindell; PO Box 501, Yorba Linda, CA 92885 */
                      4: 
                      5: #include "scfg.h"
                      6: 
                      7: void sub_cfg(uint grpnum)
                      8: {
                      9:        static int dflt,tog_dflt,opt_dflt,net_dflt,adv_dflt,bar;
                     10:        char str[81],str2[81],str3[11],done=0,code[9],*p;
                     11:        int j,m,n,ptridx,q,s;
                     12:        uint i,subnum[MAX_OPTS+1];
                     13:        static sub_t savsub;
                     14: 
                     15: while(1) {
                     16:        for(i=0,j=0;i<total_subs && j<MAX_OPTS;i++)
                     17:         if(sub[i]->grp==grpnum) {
                     18:                        subnum[j]=i;
                     19:                        if(sub[subnum[0]]->qwkconf)
                     20:                                sprintf(opt[j],"%-5u %s"
                     21:                                        ,sub[i]->qwkconf,sub[i]->lname);
                     22:                        else
                     23:                                sprintf(opt[j],"%s"
                     24:                                        ,sub[i]->lname);
                     25:                        j++; }
                     26:        subnum[j]=total_subs;
                     27:        opt[j][0]=0;
                     28:        sprintf(str,"%s Sub-boards",grp[grpnum]->sname);
                     29:        savnum=0;
                     30:        i=WIN_SAV|WIN_ACT;
                     31:        if(j)
                     32:                i|=WIN_DEL|WIN_GET|WIN_DELACT;
                     33:        if(j<MAX_OPTS)
                     34:                i|=WIN_INS|WIN_XTR|WIN_INSACT;
                     35:        if(savsub.sname[0])
                     36:                i|=WIN_PUT;
                     37:        SETHELP(WHERE);
                     38: /*
                     39: &Message Sub-boards:&
                     40: 
                     41: This is a list of message sub-boards that have been configured for the
                     42: selected message group.
                     43: 
                     44: To add a sub-board, select the desired position with the arrow keys and
                     45: hit  INS .
                     46: 
                     47: To delete a sub-board, select it with the arrow keys and hit  DEL .
                     48: 
                     49: To configure a sub-board, select it with the arrow keys and hit  ENTER .
                     50: */
                     51:        i=ulist(i,24,1,LEN_SLNAME+5,&dflt,&bar,str,opt);
                     52:        savnum=1;
                     53:        if((signed)i==-1)
                     54:                return;
                     55:        if((i&MSK_ON)==MSK_INS) {
                     56:                i&=MSK_OFF;
                     57:                strcpy(str,"General");
                     58:                SETHELP(WHERE);
                     59: /*
                     60: &Sub-board Long Name:&
                     61: 
                     62: This is a description of the message sub-board which is displayed in all
                     63: sub-board listings.
                     64: */
                     65:                if(uinput(WIN_MID|WIN_SAV,0,0,"Sub-board Long Name",str,LEN_SLNAME
                     66:                        ,K_EDIT)<1)
                     67:                        continue;
                     68:                sprintf(str2,"%.*s",LEN_SSNAME,str);
                     69:                SETHELP(WHERE);
                     70: /*
                     71: &Sub-board Short Name:&
                     72: 
                     73: This is a short description of the message sub-board which is displayed
                     74: at the main and reading messages prompts.
                     75: */
                     76:                if(uinput(WIN_MID|WIN_SAV,0,0,"Sub-board Short Name",str2,LEN_SSNAME
                     77:                        ,K_EDIT)<1)
                     78:                        continue;
                     79:                sprintf(str3,"%.10s",str2);
                     80:                SETHELP(WHERE);
                     81: /*
                     82: &Sub-board QWK Name:&
                     83: 
                     84: This is the name of the sub-board used for QWK off-line readers.
                     85: */
                     86:                if(uinput(WIN_MID|WIN_SAV,0,0,"Sub-board QWK Name",str3,10
                     87:             ,K_EDIT)<1)
                     88:             continue;
                     89:                sprintf(code,"%.8s",str3);
                     90:                p=strchr(code,SP);
                     91:                if(p) *p=0;
                     92:                strupr(code);
                     93:                SETHELP(WHERE);
                     94: /*
                     95: &Sub-board Internal Code:&
                     96: 
                     97: Every sub-board must have its own unique code for Synchronet to refer to
                     98: it internally. This code should be descriptive of the sub-board's topic,
                     99: usually an abreviation of the sub-board's name.
                    100: */
                    101:                if(uinput(WIN_MID|WIN_SAV,0,0,"Sub-board Internal Code",code,8
                    102:                        ,K_EDIT|K_UPPER)<1)
                    103:                        continue;
                    104:                if(!code_ok(code)) {
                    105:                        helpbuf=invalid_code;
                    106:                        savnum=0;
                    107:                        umsg("Invalid Code");
                    108:                        helpbuf=0;
                    109:                        continue; }
                    110: 
                    111:                if((sub=(sub_t **)REALLOC(sub,sizeof(sub_t *)*(total_subs+1)))==NULL) {
                    112:             errormsg(WHERE,ERR_ALLOC,nulstr,total_subs+1);
                    113:                        total_subs=0;
                    114:                        bail(1);
                    115:             continue; }
                    116: 
                    117:                for(ptridx=0;ptridx>-1;ptridx++) { /* Search for unused pointer indx */
                    118:             for(n=0;n<total_subs;n++)
                    119:                                if(sub[n]->ptridx==ptridx)
                    120:                     break;
                    121:             if(n==total_subs)
                    122:                 break; }
                    123: 
                    124:                if(j) {
                    125:                        for(n=total_subs;n>subnum[i];n--)
                    126:                 sub[n]=sub[n-1];
                    127:                        for(q=0;q<total_qhubs;q++)
                    128:                                for(s=0;s<qhub[q]->subs;s++)
                    129:                                        if(qhub[q]->sub[s]>=subnum[i])
                    130:                                                qhub[q]->sub[s]++; }
                    131: 
                    132:                if((sub[subnum[i]]=(sub_t *)MALLOC(sizeof(sub_t)))==NULL) {
                    133:                        errormsg(WHERE,ERR_ALLOC,nulstr,sizeof(sub_t));
                    134:                        continue; }
                    135:                memset((sub_t *)sub[subnum[i]],0,sizeof(sub_t));
                    136:                sub[subnum[i]]->grp=grpnum;
                    137:                if(total_faddrs)
                    138:                        sub[subnum[i]]->faddr=faddr[0];
                    139:                else
                    140:                        memset(&sub[subnum[i]]->faddr,0,sizeof(faddr_t));
                    141:                sub[subnum[i]]->maxmsgs=500;
                    142:                strcpy(sub[subnum[i]]->code,code);
                    143:                strcpy(sub[subnum[i]]->lname,str);
                    144:                strcpy(sub[subnum[i]]->sname,str2);
                    145:                strcpy(sub[subnum[i]]->qwkname,str3);
                    146:                sub[subnum[i]]->misc=(SUB_NSDEF|SUB_SSDEF|SUB_QUOTE|SUB_TOUSER
                    147:                        |SUB_HDRMOD|SUB_FAST);
                    148:                sub[subnum[i]]->ptridx=ptridx;
                    149:                total_subs++;
                    150:                changes=1;
                    151:                continue; }
                    152:        if((i&MSK_ON)==MSK_DEL) {
                    153:                i&=MSK_OFF;
                    154:                SETHELP(WHERE);
                    155: /*
                    156: &Delete Data in Sub-board:&
                    157: 
                    158: If you want to delete all the messages for this sub-board, select &Yes&.
                    159: */
                    160:                j=1;
                    161:                strcpy(opt[0],"Yes");
                    162:                strcpy(opt[1],"No");
                    163:                opt[2][0]=0;
                    164:                j=ulist(WIN_MID|WIN_SAV,0,0,0,&j,0
                    165:                        ,"Delete Data in Sub-board",opt);
                    166:                if(j==-1)
                    167:                        continue;
                    168:                if(j==0) {
                    169:                                sprintf(str,"%s.s*",sub[subnum[i]]->code);
                    170:                                if(!sub[subnum[i]]->data_dir[0])
                    171:                                        sprintf(tmp,"%sSUBS\\",data_dir);
                    172:                                else
                    173:                                        strcpy(tmp,sub[subnum[i]]->data_dir);
                    174:                                delfiles(tmp,str);
                    175:                                clearptrs(subnum[i]); }
                    176:                FREE(sub[subnum[i]]);
                    177:                total_subs--;
                    178:                for(j=subnum[i];j<total_subs;j++)
                    179:                        sub[j]=sub[j+1];
                    180:                for(q=0;q<total_qhubs;q++)
                    181:                        for(s=0;s<qhub[q]->subs;s++) {
                    182:                                if(qhub[q]->sub[s]==subnum[i])
                    183:                                        qhub[q]->sub[s]=INVALID_SUB;
                    184:                                else if(qhub[q]->sub[s]>subnum[i])
                    185:                                        qhub[q]->sub[s]--; }
                    186:                changes=1;
                    187:                continue; }
                    188:        if((i&MSK_ON)==MSK_GET) {
                    189:                i&=MSK_OFF;
                    190:                savsub=*sub[subnum[i]];
                    191:                continue; }
                    192:        if((i&MSK_ON)==MSK_PUT) {
                    193:                i&=MSK_OFF;
                    194:                ptridx=sub[subnum[i]]->ptridx;
                    195:                *sub[subnum[i]]=savsub;
                    196:                sub[subnum[i]]->ptridx=ptridx;
                    197:                sub[subnum[i]]->grp=grpnum;
                    198:                changes=1;
                    199:         continue; }
                    200:        i=subnum[i];
                    201:        j=0;
                    202:        done=0;
                    203:        while(!done) {
                    204:                n=0;
                    205:                sprintf(opt[n++],"%-27.27s%s","Long Name",sub[i]->lname);
                    206:                sprintf(opt[n++],"%-27.27s%s","Short Name",sub[i]->sname);
                    207:                sprintf(opt[n++],"%-27.27s%s","QWK Name",sub[i]->qwkname);
                    208:                sprintf(opt[n++],"%-27.27s%s","Internal Code",sub[i]->code);
                    209:                sprintf(opt[n++],"%-27.27s%.40s","Access Requirements"
                    210:                        ,sub[i]->ar);
                    211:                sprintf(opt[n++],"%-27.27s%.40s","Reading Requirements"
                    212:             ,sub[i]->read_ar);
                    213:                sprintf(opt[n++],"%-27.27s%.40s","Posting Requirements"
                    214:                        ,sub[i]->post_ar);
                    215:                sprintf(opt[n++],"%-27.27s%.40s","Operator Requirements"
                    216:                        ,sub[i]->op_ar);
                    217:                sprintf(opt[n++],"%-27.27s%.40s","Moderated Posting User"
                    218:                        ,sub[i]->mod_ar);
                    219:                sprintf(opt[n++],"%-27.27s%u","Maximum Messages"
                    220:             ,sub[i]->maxmsgs);
                    221:                if(sub[i]->maxage)
                    222:             sprintf(str,"Enabled (%u days old)",sub[i]->maxage);
                    223:         else
                    224:             strcpy(str,"Disabled");
                    225:                sprintf(opt[n++],"%-27.27s%s","Purge by Age",str);
                    226:                if(sub[i]->maxcrcs)
                    227:                        sprintf(str,"Enabled (%lu message CRCs)",sub[i]->maxcrcs);
                    228:                else
                    229:                        strcpy(str,"Disabled");
                    230:                sprintf(opt[n++],"%-27.27s%s","Duplicate Checking",str);
                    231: 
                    232:                strcpy(opt[n++],"Toggle Options...");
                    233:                strcpy(opt[n++],"Network Options...");
                    234:                strcpy(opt[n++],"Advanced Options...");
                    235:                opt[n][0]=0;
                    236:                sprintf(str,"%s Sub-board",sub[i]->sname);
                    237:                savnum=1;
                    238:                SETHELP(WHERE);
                    239: /*
                    240: &Sub-board Configuration:&
                    241: 
                    242: This menu allows you to configure the individual selected sub-board.
                    243: Options with a trailing &...& provide a sub-menu of more options.
                    244: */
                    245:                switch(ulist(WIN_ACT|WIN_SAV|WIN_RHT|WIN_BOT
                    246:                        ,0,0,60,&opt_dflt,0,str,opt)) {
                    247:                        case -1:
                    248:                                done=1;
                    249:                                break;
                    250:                        case 0:
                    251:                                SETHELP(WHERE);
                    252: /*
                    253: &Sub-board Long Name:&
                    254: 
                    255: This is a description of the message sub-board which is displayed in all
                    256: sub-board listings.
                    257: */
                    258:                                strcpy(str,sub[i]->lname);      /* save */
                    259:                                if(!uinput(WIN_MID|WIN_SAV,0,17,"Name to use for Listings"
                    260:                                        ,sub[i]->lname,LEN_SLNAME,K_EDIT))
                    261:                                        strcpy(sub[i]->lname,str);      /* restore */
                    262:                                break;
                    263:                        case 1:
                    264:                                SETHELP(WHERE);
                    265: /*
                    266: &Sub-board Short Name:&
                    267: 
                    268: This is a short description of the message sub-board which is displayed
                    269: at the main and reading messages prompts.
                    270: */
                    271:                                uinput(WIN_MID|WIN_SAV,0,17,"Name to use for Prompts"
                    272:                                        ,sub[i]->sname,LEN_SSNAME,K_EDIT);
                    273:                                break;
                    274:                        case 2:
                    275:                                SETHELP(WHERE);
                    276: /*
                    277: &Sub-board QWK Name:&
                    278: 
                    279: This is the name of the sub-board used for QWK off-line readers.
                    280: */
                    281:                                uinput(WIN_MID|WIN_SAV,0,17,"Name to use for QWK Packets"
                    282:                                        ,sub[i]->qwkname,10,K_EDIT);
                    283:                 break;
                    284:                        case 3:
                    285:                 SETHELP(WHERE);
                    286: /*
                    287: &Sub-board Internal Code:&
                    288: 
                    289: Every sub-board must have its own unique code for Synchronet to refer
                    290: to it internally. This code should be descriptive of the sub-board's
                    291: topic, usually an abreviation of the sub-board's name.
                    292: */
                    293:                 strcpy(str,sub[i]->code);
                    294:                 uinput(WIN_MID|WIN_SAV,0,17,"Internal Code (unique)"
                    295:                     ,str,8,K_EDIT|K_UPPER);
                    296:                 if(code_ok(str))
                    297:                     strcpy(sub[i]->code,str);
                    298:                 else {
                    299:                     helpbuf=invalid_code;
                    300:                     umsg("Invalid Code");
                    301:                     helpbuf=0; }
                    302:                 break;
                    303:                        case 4:
                    304:                                savnum=2;
                    305:                                sprintf(str,"%s Access",sub[i]->sname);
                    306:                                getar(str,sub[i]->ar);
                    307:                                break;
                    308:                        case 5:
                    309:                                savnum=2;
                    310:                                sprintf(str,"%s Reading",sub[i]->sname);
                    311:                                getar(str,sub[i]->read_ar);
                    312:                 break;
                    313:                        case 6:
                    314:                                savnum=2;
                    315:                                sprintf(str,"%s Posting",sub[i]->sname);
                    316:                                getar(str,sub[i]->post_ar);
                    317:                 break;
                    318:                        case 7:
                    319:                                savnum=2;
                    320:                                sprintf(str,"%s Operator",sub[i]->sname);
                    321:                                getar(str,sub[i]->op_ar);
                    322:                 break;
                    323:                        case 8:
                    324:                                savnum=2;
                    325:                                sprintf(str,"%s Moderated Posting User",sub[i]->sname);
                    326:                                getar(str,sub[i]->mod_ar);
                    327:                 break;
                    328:                        case 9:
                    329:                                sprintf(str,"%u",sub[i]->maxmsgs);
                    330:                 SETHELP(WHERE);
                    331: /*
                    332: &Maximum Number of Messages:&
                    333: 
                    334: This value is the maximum number of messages that will be kept in the
                    335: sub-board. Once this maximum number of messages is reached, the oldest
                    336: messages will be automatically purged. Usually, 100 messages is a
                    337: sufficient maximum.
                    338: */
                    339:                 uinput(WIN_MID|WIN_SAV,0,17,"Maximum Number of Messages"
                    340:                     ,str,5,K_EDIT|K_NUMBER);
                    341:                 sub[i]->maxmsgs=atoi(str);
                    342:                 sub[i]->misc|=SUB_HDRMOD;
                    343:                                break;
                    344:                        case 10:
                    345:                                sprintf(str,"%u",sub[i]->maxage);
                    346:                 SETHELP(WHERE);
                    347: /*
                    348: &Maximum Age of Messages:&
                    349: 
                    350: This value is the maximum number of days that messages will be kept in
                    351: the sub-board.
                    352: */
                    353:                 uinput(WIN_MID|WIN_SAV,0,17,"Maximum Age of Messages (in days)"
                    354:                     ,str,5,K_EDIT|K_NUMBER);
                    355:                 sub[i]->maxage=atoi(str);
                    356:                 sub[i]->misc|=SUB_HDRMOD;
                    357:                                break;
                    358:                        case 11:
                    359:                                sprintf(str,"%u",sub[i]->maxcrcs);
                    360:                                SETHELP(WHERE);
                    361: /*
                    362: &Maximum Number of CRCs:&
                    363: 
                    364: This value is the maximum number of CRCs that will be kept in the
                    365: sub-board for duplicate message checking. Once this maximum number of
                    366: CRCs is reached, the oldest CRCs will be automatically purged.
                    367: */
                    368:                                uinput(WIN_MID|WIN_SAV,0,17,"Maximum Number of CRCs"
                    369:                                        ,str,5,K_EDIT|K_NUMBER);
                    370:                                sub[i]->maxcrcs=atol(str);
                    371:                                sub[i]->misc|=SUB_HDRMOD;
                    372:                 break;
                    373:                        case 12:
                    374:                                while(1) {
                    375:                                        n=0;
                    376:                                        sprintf(opt[n++],"%-27.27s%s","Allow Private Posts"
                    377:                                                ,sub[i]->misc&SUB_PRIV ? sub[i]->misc&SUB_PONLY
                    378:                                                ? "Only":"Yes":"No");
                    379:                                        sprintf(opt[n++],"%-27.27s%s","Allow Anonymous Posts"
                    380:                                                ,sub[i]->misc&SUB_ANON ? sub[i]->misc&SUB_AONLY
                    381:                                                ? "Only":"Yes":"No");
                    382:                                        sprintf(opt[n++],"%-27.27s%s","Post Using Real Names"
                    383:                                                ,sub[i]->misc&SUB_NAME ? "Yes":"No");
                    384:                                        sprintf(opt[n++],"%-27.27s%s","Users Can Delete Posts"
                    385:                                                ,sub[i]->misc&SUB_DEL ? sub[i]->misc&SUB_DELLAST
                    386:                                                ? "Last":"Yes":"No");
                    387:                                        sprintf(opt[n++],"%-27.27s%s","Default On for New Scan"
                    388:                                                ,sub[i]->misc&SUB_NSDEF ? "Yes":"No");
                    389:                                        sprintf(opt[n++],"%-27.27s%s","Forced On for New Scan"
                    390:                                                ,sub[i]->misc&SUB_FORCED ? "Yes":"No");
                    391:                                        sprintf(opt[n++],"%-27.27s%s","Default On for Your Scan"
                    392:                                                ,sub[i]->misc&SUB_SSDEF ? "Yes":"No");
                    393:                                        sprintf(opt[n++],"%-27.27s%s","Public 'To' User"
                    394:                                                ,sub[i]->misc&SUB_TOUSER ? "Yes":"No");
                    395:                                        sprintf(opt[n++],"%-27.27s%s","Allow Message Quoting"
                    396:                                                ,sub[i]->misc&SUB_QUOTE ? "Yes":"No");
                    397:                                        sprintf(opt[n++],"%-27.27s%s","Permanent Operator Msgs"
                    398:                                                ,sub[i]->misc&SUB_SYSPERM ? "Yes":"No");
                    399:                                        sprintf(opt[n++],"%-27.27s%s","Kill Read Messages"
                    400:                                                ,sub[i]->misc&SUB_KILL ? "Yes"
                    401:                                                : (sub[i]->misc&SUB_KILLP ? "Pvt" : "No"));
                    402: #if 1
                    403:                                        sprintf(opt[n++],"%-27.27s%s","Compress Messages (LZH)"
                    404:                                                ,sub[i]->misc&SUB_LZH ? "Yes" : "No");
                    405: #endif
                    406:                                        opt[n][0]=0;
                    407:                                        savnum=2;
                    408:                                        SETHELP(WHERE);
                    409: /*
                    410: &Sub-board Toggle Options:&
                    411: 
                    412: This menu allows you to toggle certain options for the selected
                    413: sub-board between two or more settings, such as &Yes& and &No&.
                    414: */
                    415:                                        n=ulist(WIN_ACT|WIN_SAV|WIN_RHT|WIN_BOT,3,2,36,&tog_dflt,0
                    416:                                                ,"Toggle Options",opt);
                    417:                                        if(n==-1)
                    418:                                                break;
                    419:                                        savnum=3;
                    420:                                        switch(n) {
                    421:                                                case 0:
                    422:                                                        n=1;
                    423:                                                        strcpy(opt[0],"Yes");
                    424:                                                        strcpy(opt[1],"No");
                    425:                                                        strcpy(opt[2],"Only");
                    426:                                                        opt[3][0]=0;
                    427:                                                        SETHELP(WHERE);
                    428: /*
                    429: &Allow Private Posts on Sub-board:&
                    430: 
                    431: If you want users to be able to post private messages to other users
                    432: on this sub-board, set this value to &Yes&. Usually, E-mail is the
                    433: preferred method of private communication. If you want users to be able
                    434: to post private messages only on this sub-board, select &Only&.
                    435: */
                    436:                                                        n=ulist(WIN_SAV|WIN_MID,0,0,0,&n,0
                    437:                                                                ,"Allow Private Posts",opt);
                    438:                                                        if(n==-1)
                    439:                                                                break;
                    440:                                                        if(!n && (sub[i]->misc&(SUB_PRIV|SUB_PONLY))
                    441:                                                                !=SUB_PRIV) {
                    442:                                                                changes=1;
                    443:                                                                sub[i]->misc&=~SUB_PONLY;
                    444:                                                                sub[i]->misc|=SUB_PRIV;
                    445:                                                                break; }
                    446:                                                        if(n==1 && sub[i]->misc&SUB_PRIV) {
                    447:                                                                changes=1;
                    448:                                                                sub[i]->misc&=~SUB_PRIV;
                    449:                                                                break; }
                    450:                                                        if(n==2 && (sub[i]->misc&(SUB_PRIV|SUB_PONLY))
                    451:                                                                !=(SUB_PRIV|SUB_PONLY)) {
                    452:                                                                changes=1;
                    453:                                                                sub[i]->misc|=(SUB_PRIV|SUB_PONLY); }
                    454:                                                        break;
                    455:                                                case 1:
                    456:                                                        n=1;
                    457:                                                        strcpy(opt[0],"Yes");
                    458:                                                        strcpy(opt[1],"No");
                    459:                                                        strcpy(opt[2],"Only");
                    460:                                                        opt[3][0]=0;
                    461:                                                        SETHELP(WHERE);
                    462: /*
                    463: &Allow Anonymous Posts on Sub-board:&
                    464: 
                    465: If you want users with the &A& exemption to be able to post anonymously on
                    466: this sub-board, select &Yes&. If you want all posts on this sub-board to be
                    467: forced anonymous, select &Only&. If you do not want anonymous posts allowed
                    468: on this sub-board at all, select &No&.
                    469: */
                    470:                                                        n=ulist(WIN_SAV|WIN_MID,0,0,0,&n,0
                    471:                                                                ,"Allow Anonymous Posts",opt);
                    472:                                                        if(n==-1)
                    473:                                                                break;
                    474:                                                        if(!n && (sub[i]->misc&(SUB_ANON|SUB_AONLY))
                    475:                                                                !=SUB_ANON) {
                    476:                                                                changes=1;
                    477:                                                                sub[i]->misc&=~SUB_AONLY;
                    478:                                                                sub[i]->misc|=SUB_ANON;
                    479:                                                                break; }
                    480:                                                        if(n==1 && sub[i]->misc&(SUB_ANON|SUB_AONLY)) {
                    481:                                                                changes=1;
                    482:                                                                sub[i]->misc&=~(SUB_ANON|SUB_AONLY);
                    483:                                                                break; }
                    484:                                                        if(n==2 && (sub[i]->misc&(SUB_ANON|SUB_AONLY))
                    485:                                                                !=(SUB_ANON|SUB_AONLY)) {
                    486:                                                                changes=1;
                    487:                                                                sub[i]->misc|=(SUB_ANON|SUB_AONLY); }
                    488:                             break;
                    489:                                                case 2:
                    490:                                                        n=1;
                    491:                                                        strcpy(opt[0],"Yes");
                    492:                                                        strcpy(opt[1],"No");
                    493:                                                        opt[2][0]=0;
                    494:                                                        SETHELP(WHERE);
                    495: /*
                    496: &User Real Names in Posts on Sub-board:&
                    497: 
                    498: If you allow aliases on your system, you can have messages on this
                    499: sub-board automatically use the real name of the posting user by setting
                    500: this option to &Yes&.
                    501: */
                    502:                                                        n=ulist(WIN_SAV|WIN_MID,0,0,0,&n,0
                    503:                                                                ,"Use Real Names in Posts",opt);
                    504:                                                        if(n==-1)
                    505:                                 break;
                    506:                                                        if(!n && !(sub[i]->misc&SUB_NAME)) {
                    507:                                                                changes=1;
                    508:                                                                sub[i]->misc|=SUB_NAME;
                    509:                                                                break; }
                    510:                                                        if(n==1 && sub[i]->misc&SUB_NAME) {
                    511:                                                                changes=1;
                    512:                                                                sub[i]->misc&=~SUB_NAME; }
                    513:                                                        break;
                    514:                                                case 3:
                    515:                                                        n=2;
                    516:                                                        strcpy(opt[0],"Yes");
                    517:                                                        strcpy(opt[1],"No");
                    518:                                                        strcpy(opt[2],"Last Post Only");
                    519:                                                        opt[3][0]=0;
                    520:                                                        SETHELP(WHERE);
                    521: /*
                    522: &Users Can Delete Posts on Sub-board:&
                    523: 
                    524: If you want users to be able to delete any of their own posts on this
                    525: sub-board, set this option to &Yes&. If you want to allow users the
                    526: ability to delete their message only if it is the last message on the
                    527: sub-board, select &Last Post Only&. If you want to disallow users from
                    528: deleting any of their posts, set this option to &No&.
                    529: */
                    530:                                                        n=ulist(WIN_SAV|WIN_MID,0,0,0,&n,0
                    531:                                                                ,"Users Can Delete Posts",opt);
                    532:                                                        if(n==-1)
                    533:                                                                break;
                    534:                                                        if(!n && (sub[i]->misc&(SUB_DEL|SUB_DELLAST))
                    535:                                                                !=SUB_DEL) {
                    536:                                                                changes=1;
                    537:                                                                sub[i]->misc&=~SUB_DELLAST;
                    538:                                                                sub[i]->misc|=SUB_DEL;
                    539:                                                                break; }
                    540:                                                        if(n==1 && sub[i]->misc&SUB_DEL) {
                    541:                                                                changes=1;
                    542:                                                                sub[i]->misc&=~SUB_DEL;
                    543:                                                                break; }
                    544:                                                        if(n==2 && (sub[i]->misc&(SUB_DEL|SUB_DELLAST))
                    545:                                                                !=(SUB_DEL|SUB_DELLAST)) {
                    546:                                                                changes=1;
                    547:                                                                sub[i]->misc|=(SUB_DEL|SUB_DELLAST); }
                    548:                             break;
                    549:                                                case 4:
                    550:                                                        n=0;
                    551:                                                        strcpy(opt[0],"Yes");
                    552:                                                        strcpy(opt[1],"No");
                    553:                                                        opt[2][0]=0;
                    554:                                                        SETHELP(WHERE);
                    555: /*
                    556: &Default On for New Scan:&
                    557: 
                    558: If you want this sub-board to be included in all user new message scans
                    559: by default, set this option to &Yes&.
                    560: */
                    561:                                                        n=ulist(WIN_SAV|WIN_MID,0,0,0,&n,0
                    562:                                                                ,"Default On for New Scan",opt);
                    563:                                                        if(n==-1)
                    564:                                 break;
                    565:                                                        if(!n && !(sub[i]->misc&SUB_NSDEF)) {
                    566:                                                                changes=1;
                    567:                                                                sub[i]->misc|=SUB_NSDEF;
                    568:                                                                break; }
                    569:                                                        if(n==1 && sub[i]->misc&SUB_NSDEF) {
                    570:                                                                changes=1;
                    571:                                                                sub[i]->misc&=~SUB_NSDEF; }
                    572:                             break;
                    573:                                                case 5:
                    574:                                                        n=1;
                    575:                                                        strcpy(opt[0],"Yes");
                    576:                                                        strcpy(opt[1],"No");
                    577:                                                        opt[2][0]=0;
                    578:                                                        SETHELP(WHERE);
                    579: /*
                    580: &Forced On for New Scan:&
                    581: 
                    582: If you want this sub-board to be included in all user new message scans
                    583: even if the user has removed it from their new scan configuration, set
                    584: this option to &Yes&.
                    585: */
                    586:                                                        n=ulist(WIN_SAV|WIN_MID,0,0,0,&n,0
                    587:                                                                ,"Forced New Scan",opt);
                    588:                                                        if(n==-1)
                    589:                                 break;
                    590:                                                        if(!n && !(sub[i]->misc&SUB_FORCED)) {
                    591:                                                                changes=1;
                    592:                                                                sub[i]->misc|=SUB_FORCED;
                    593:                                                                break; }
                    594:                                                        if(n==1 && sub[i]->misc&SUB_FORCED) {
                    595:                                                                changes=1;
                    596:                                                                sub[i]->misc&=~SUB_FORCED; }
                    597:                             break;
                    598:                                                case 6:
                    599:                                                        n=0;
                    600:                                                        strcpy(opt[0],"Yes");
                    601:                                                        strcpy(opt[1],"No");
                    602:                                                        opt[2][0]=0;
                    603:                                                        SETHELP(WHERE);
                    604: /*
                    605: &Default On for Your Scan:&
                    606: 
                    607: If you want this sub-board to be included in all user personal message
                    608: scans by default, set this option to &Yes&.
                    609: */
                    610:                                                        n=ulist(WIN_SAV|WIN_MID,0,0,0,&n,0
                    611:                                                                ,"Default On for Your Scan",opt);
                    612:                                                        if(n==-1)
                    613:                                 break;
                    614:                                                        if(!n && !(sub[i]->misc&SUB_SSDEF)) {
                    615:                                                                changes=1;
                    616:                                                                sub[i]->misc|=SUB_SSDEF;
                    617:                                                                break; }
                    618:                                                        if(n==1 && sub[i]->misc&SUB_SSDEF) {
                    619:                                                                changes=1;
                    620:                                                                sub[i]->misc&=~SUB_SSDEF; }
                    621:                             break;
                    622:                                                case 7:
                    623:                                                        n=1;
                    624:                                                        strcpy(opt[0],"Yes");
                    625:                                                        strcpy(opt[1],"No");
                    626:                                                        opt[2][0]=0;
                    627:                                                        SETHELP(WHERE);
                    628: /*
                    629: &Prompt for 'To' User on Public Posts:&
                    630: 
                    631: If you want all posts on this sub-board to be prompted for a 'To' user,
                    632: set this option to &Yes&. This is a useful option for sub-boards that
                    633: are on a network that does not allow private posts.
                    634: */
                    635:                                                        n=ulist(WIN_SAV|WIN_MID,0,0,0,&n,0
                    636:                                                                ,"Prompt for 'To' User on Public Posts",opt);
                    637:                                                        if(n==-1)
                    638:                                 break;
                    639:                                                        if(!n && !(sub[i]->misc&SUB_TOUSER)) {
                    640:                                                                changes=1;
                    641:                                                                sub[i]->misc|=SUB_TOUSER;
                    642:                                                                break; }
                    643:                                                        if(n==1 && sub[i]->misc&SUB_TOUSER) {
                    644:                                                                changes=1;
                    645:                                                                sub[i]->misc&=~SUB_TOUSER; }
                    646:                                                        break;
                    647:                                                case 8:
                    648:                                                        n=1;
                    649:                                                        strcpy(opt[0],"Yes");
                    650:                                                        strcpy(opt[1],"No");
                    651:                                                        opt[2][0]=0;
                    652:                                                        SETHELP(WHERE);
                    653: /*
                    654: &Allow Message Quoting:&
                    655: 
                    656: If you want users to be allowed to quote messages on this sub-board, set
                    657: this option to &Yes&.
                    658: */
                    659:                                                        n=ulist(WIN_SAV|WIN_MID,0,0,0,&n,0
                    660:                                                                ,"Allow Message Quoting",opt);
                    661:                                                        if(n==-1)
                    662:                                 break;
                    663:                                                        if(!n && !(sub[i]->misc&SUB_QUOTE)) {
                    664:                                                                changes=1;
                    665:                                                                sub[i]->misc|=SUB_QUOTE;
                    666:                                                                break; }
                    667:                                                        if(n==1 && sub[i]->misc&SUB_QUOTE) {
                    668:                                                                changes=1;
                    669:                                                                sub[i]->misc&=~SUB_QUOTE; }
                    670:                             break;
                    671:                                                case 9:
                    672:                                                        n=1;
                    673:                                                        strcpy(opt[0],"Yes");
                    674:                                                        strcpy(opt[1],"No");
                    675:                                                        opt[2][0]=0;
                    676:                                                        SETHELP(WHERE);
                    677: /*
                    678: &Operator Messages Automatically Permanent:&
                    679: 
                    680: If you want messages posted by &System& and &Sub-board Operators& to be
                    681: automatically permanent (non-purgable) for this sub-board, set this
                    682: option to &Yes&.
                    683: */
                    684:                                                        n=ulist(WIN_SAV|WIN_MID,0,0,0,&n,0
                    685:                                                                ,"Permanent Operator Messages",opt);
                    686:                                                        if(n==-1)
                    687:                                 break;
                    688:                                                        if(!n && !(sub[i]->misc&SUB_SYSPERM)) {
                    689:                                                                changes=1;
                    690:                                                                sub[i]->misc|=SUB_SYSPERM;
                    691:                                                                break; }
                    692:                                                        if(n==1 && sub[i]->misc&SUB_SYSPERM) {
                    693:                                                                changes=1;
                    694:                                                                sub[i]->misc&=~SUB_SYSPERM; }
                    695:                             break;
                    696:                                                case 10:
                    697:                                                        n=1;
                    698:                                                        strcpy(opt[0],"Yes");
                    699:                                                        strcpy(opt[1],"No");
                    700:                                                        strcpy(opt[2],"Private");
                    701:                                                        opt[3][0]=0;
                    702:                                                        SETHELP(WHERE);
                    703: /*
                    704: &Kill Read Messages Automatically:&
                    705: 
                    706: If you want messages that have been read by the intended recipient to
                    707: be automatically deleted by &SMBUTIL&, set this option to &Yes& or
                    708: &Private& if you want only private messages to be automatically deleted.
                    709: */
                    710:                                                        n=ulist(WIN_SAV|WIN_MID,0,0,0,&n,0
                    711:                                                                ,"Kill Read Messages",opt);
                    712:                                                        if(n==-1)
                    713:                                 break;
                    714:                                                        if(!n && !(sub[i]->misc&SUB_KILL)) {
                    715:                                                                changes=1;
                    716:                                                                sub[i]->misc|=SUB_KILL;
                    717:                                                                sub[i]->misc&=~SUB_KILLP;
                    718:                                                                break; }
                    719:                                                        if(n==1 && sub[i]->misc&(SUB_KILL|SUB_KILLP)) {
                    720:                                                                changes=1;
                    721:                                                                sub[i]->misc&=~(SUB_KILL|SUB_KILLP); }
                    722:                                                        if(n==2 && !(sub[i]->misc&SUB_KILLP)) {
                    723:                                                                changes=1;
                    724:                                                                sub[i]->misc|=SUB_KILLP;
                    725:                                                                sub[i]->misc&=~SUB_KILL;
                    726:                                 break; }
                    727:                             break;
                    728: #if 1
                    729:                                                case 11:
                    730:                                                        n=1;
                    731:                                                        strcpy(opt[0],"Yes");
                    732:                                                        strcpy(opt[1],"No");
                    733:                                                        opt[2][0]=0;
                    734:                                                        SETHELP(WHERE);
                    735: /*
                    736: &Compress Messages with LZH Encoding:&
                    737: 
                    738: If you want all messages in this sub-board to be automatically
                    739: compressed via &LZH& (Lempel/Ziv/Huffman algorithm used in LHarc, LHA,
                    740: and other popular compression and archive programs), this option to &Yes&.
                    741: 
                    742: Compression will slow down the reading and writing of messages slightly,
                    743: but the storage space saved can be as much as &50 percent&.
                    744: 
                    745: Before setting this option to &Yes&, make sure that all of the SMB
                    746: compatible mail programs you use support the &LZH& translation.
                    747: */
                    748:                                                        n=ulist(WIN_SAV|WIN_MID,0,0,0,&n,0
                    749:                                                                ,"Compress Messages (LZH)",opt);
                    750:                                                        if(n==-1)
                    751:                                 break;
                    752:                                                        if(!n && !(sub[i]->misc&SUB_LZH)) {
                    753:                                                                changes=1;
                    754:                                                                sub[i]->misc|=SUB_LZH;
                    755:                                                                break; }
                    756:                                                        if(n==1 && sub[i]->misc&SUB_LZH) {
                    757:                                                                changes=1;
                    758:                                                                sub[i]->misc&=~SUB_LZH; }
                    759:                             break;
                    760: #endif
                    761:                                                        } }
                    762:                                break;
                    763:                        case 13:
                    764:                                while(1) {
                    765:                                        n=0;
                    766:                                        sprintf(opt[n++],"%-27.27s%s","Append Tag/Origin Line"
                    767:                                                ,sub[i]->misc&SUB_NOTAG ? "No":"Yes");
                    768:                                        sprintf(opt[n++],"%-27.27s%s","Export ASCII Only"
                    769:                                                ,sub[i]->misc&SUB_ASCII ? "Yes":"No");
                    770:                                        sprintf(opt[n++],"%-27.27s%s","Gate Between Net Types"
                    771:                                                ,sub[i]->misc&SUB_GATE ? "Yes":"No");
                    772:                                        sprintf(opt[n++],"%-27.27s%s","QWK Networked"
                    773:                                                ,sub[i]->misc&SUB_QNET ? "Yes":"No");
                    774:                                        sprintf(opt[n++],"QWK Tagline");
                    775:                                        sprintf(opt[n++],"%-27.27s%s","Internet"
                    776:                                                ,sub[i]->misc&SUB_INET ? "Yes":"No");
                    777:                                        sprintf(opt[n++],"%-27.27s%s","PostLink or PCRelay"
                    778:                         ,sub[i]->misc&SUB_PNET ? "Yes":"No");
                    779:                                        sprintf(opt[n++],"%-27.27s%s","FidoNet EchoMail"
                    780:                                                ,sub[i]->misc&SUB_FIDO ? "Yes":"No");
                    781:                                        sprintf(opt[n++],"%-27.27s%s","FidoNet Address"
                    782:                         ,faddrtoa(sub[i]->faddr));
                    783:                                        sprintf(opt[n++],"EchoMail Origin Line");
                    784:                                        if(!sub[i]->echopath[0])
                    785:                                                sprintf(str,"%s%s\\",echomail_dir,sub[i]->code);
                    786:                                        else
                    787:                                                strcpy(str,sub[i]->echopath);
                    788:                                        sprintf(opt[n++],"%-27.27s%.40s","EchoMail Directory"
                    789:                                                ,str);
                    790:                                        if(!sub[i]->echomail_sem[0])
                    791:                                                strcpy(str,echomail_sem);
                    792:                                        else
                    793:                                                strcpy(str,sub[i]->echomail_sem);
                    794:                                        sprintf(opt[n++],"%-27.27s%.40s","EchoMail Semaphore File"
                    795:                                                ,str);
                    796:                                        opt[n][0]=0;
                    797:                                        savnum=2;
                    798:                                        SETHELP(WHERE);
                    799: /*
                    800: &Sub-board Network Options:&
                    801: 
                    802: This menu contains options for the selected sub-board that pertain
                    803: specifically to message networking.
                    804: */
                    805:                                        n=ulist(WIN_ACT|WIN_SAV|WIN_RHT|WIN_BOT,3,2,60,&net_dflt,0
                    806:                                                ,"Network Options",opt);
                    807:                                        if(n==-1)
                    808:                                                break;
                    809:                                        savnum=3;
                    810:                     switch(n) {
                    811:                                                case 0:
                    812:                                                        n=0;
                    813:                                                        strcpy(opt[0],"Yes");
                    814:                                                        strcpy(opt[1],"No");
                    815:                                                        opt[2][0]=0;
                    816:                                                        SETHELP(WHERE);
                    817: /*
                    818: &Append Tag/Origin Line to Posts:&
                    819: 
                    820: If you want to disable the automatic addition of a network tagline or
                    821: origin line to the bottom of outgoing networked posts from this
                    822: sub-board, set this option to &No&.
                    823: */
                    824:                                                        n=ulist(WIN_SAV|WIN_MID,0,0,0,&n,0
                    825:                                                                ,"Append Tag/Origin Line to Posts",opt);
                    826:                                                        if(n==-1)
                    827:                                 break;
                    828:                                                        if(!n && sub[i]->misc&SUB_NOTAG) {
                    829:                                                                changes=1;
                    830:                                                                sub[i]->misc&=~SUB_NOTAG;
                    831:                                                                break; }
                    832:                                                        if(n==1 && !(sub[i]->misc&SUB_NOTAG)) {
                    833:                                                                changes=1;
                    834:                                                                sub[i]->misc|=SUB_NOTAG; }
                    835:                             break;
                    836:                                                case 1:
                    837:                                                        n=0;
                    838:                                                        strcpy(opt[0],"Yes");
                    839:                                                        strcpy(opt[1],"No");
                    840:                                                        opt[2][0]=0;
                    841:                                                        SETHELP(WHERE);
                    842: /*
                    843: &Export ASCII Characters Only:&
                    844: 
                    845: If the network that this sub-board is echoed on does not allow extended
                    846: ASCII (>127) or control codes (<20, not including CR), set this option
                    847: to &Yes&.
                    848: */
                    849:                                                        n=ulist(WIN_SAV|WIN_MID,0,0,0,&n,0
                    850:                                                                ,"Export ASCII Characters Only",opt);
                    851:                                                        if(n==-1)
                    852:                                 break;
                    853:                                                        if(n && sub[i]->misc&SUB_ASCII) {
                    854:                                                                changes=1;
                    855:                                                                sub[i]->misc&=~SUB_ASCII;
                    856:                                                                break; }
                    857:                                                        if(!n && !(sub[i]->misc&SUB_ASCII)) {
                    858:                                                                changes=1;
                    859:                                                                sub[i]->misc|=SUB_ASCII; }
                    860:                             break;
                    861:                                                case 2:
                    862:                                                        n=1;
                    863:                                                        strcpy(opt[0],"Yes");
                    864:                                                        strcpy(opt[1],"No");
                    865:                                                        opt[2][0]=0;
                    866:                                                        SETHELP(WHERE);
                    867: /*
                    868: &Gate Between Net Types:&
                    869: 
                    870: If this sub-board is networked using more than one network technology,
                    871: and you want messages to be &gated& between the networks, set this
                    872: option to &Yes&.
                    873: 
                    874: If this option is set to &No&, messages imported from one network type
                    875: will ¬& be exported to another network type. This is the default and
                    876: should be used unless you have &specific& permission from both networks
                    877: to gate this sub-board. Incorrectly gated sub-boards can cause duplicate
                    878: messages loops and cross-posted messages.
                    879: 
                    880: This option does not affect the exporting of messages created on your
                    881: BBS.
                    882: */
                    883:                                                        n=ulist(WIN_SAV|WIN_MID,0,0,0,&n,0
                    884:                                                                ,"Gate Between Net Types",opt);
                    885:                                                        if(n==-1)
                    886:                                 break;
                    887:                                                        if(!n && !(sub[i]->misc&SUB_GATE)) {
                    888:                                                                changes=1;
                    889:                                                                sub[i]->misc|=SUB_GATE;
                    890:                                                                break; }
                    891:                                                        if(n==1 && sub[i]->misc&SUB_GATE) {
                    892:                                                                changes=1;
                    893:                                                                sub[i]->misc&=~SUB_GATE; }
                    894:                             break;
                    895:                                                case 3:
                    896:                                                        n=1;
                    897:                                                        strcpy(opt[0],"Yes");
                    898:                                                        strcpy(opt[1],"No");
                    899:                                                        opt[2][0]=0;
                    900:                                                        SETHELP(WHERE);
                    901: /*
                    902: &Sub-board Networked via QWK Packets:&
                    903: 
                    904: If this sub-board is networked with other BBSs via QWK packets, this
                    905: option should be set to &Yes&. With this option set to &Yes&, titles of
                    906: posts on this sub-board will be limited to the QWK packet limitation of
                    907: 25 characters. It also allows the &N&etwork restriction to function
                    908: properly.
                    909: */
                    910:                                                        n=ulist(WIN_SAV|WIN_MID,0,0,0,&n,0
                    911:                                                                ,"Networked via QWK Packets",opt);
                    912:                                                        if(n==-1)
                    913:                                 break;
                    914:                                                        if(!n && !(sub[i]->misc&SUB_QNET)) {
                    915:                                                                changes=1;
                    916:                                                                sub[i]->misc|=SUB_QNET;
                    917:                                                                break; }
                    918:                                                        if(n==1 && sub[i]->misc&SUB_QNET) {
                    919:                                                                changes=1;
                    920:                                                                sub[i]->misc&=~SUB_QNET; }
                    921:                             break;
                    922:                                                case 4:
                    923:                                                        SETHELP(WHERE);
                    924: /*
                    925: &Sub-board QWK Network Tagline:&
                    926: 
                    927: If you want to use a different QWK tagline than the configured default
                    928: tagline in the &Networks& configuration, you should enter that tagline
                    929: here. If this option is left blank, the default tagline is used.
                    930: */
                    931:                                                        uinput(WIN_MID|WIN_SAV,0,0,nulstr,sub[i]->tagline
                    932:                                                                ,63,K_MSG|K_EDIT);
                    933:                                                        break;
                    934:                                                case 5:
                    935:                                                        n=1;
                    936:                                                        strcpy(opt[0],"Yes");
                    937:                                                        strcpy(opt[1],"No");
                    938:                                                        opt[2][0]=0;
                    939:                                                        SETHELP(WHERE);
                    940: /*
                    941: &Sub-board Networked via Internet:&
                    942: 
                    943: If this sub-board is networked to the Internet via UUCP, this option
                    944: should be set to &Yes&.
                    945: 
                    946: It will allow the &N&etwork restriction to function properly.
                    947: */
                    948:                                                        n=ulist(WIN_SAV|WIN_MID,0,0,0,&n,0
                    949:                                                                ,"Networked via Internet",opt);
                    950:                                                        if(n==-1)
                    951:                                 break;
                    952:                                                        if(!n && !(sub[i]->misc&SUB_INET)) {
                    953:                                                                changes=1;
                    954:                                                                sub[i]->misc|=SUB_INET;
                    955:                                                                break; }
                    956:                                                        if(n==1 && sub[i]->misc&SUB_INET) {
                    957:                                                                changes=1;
                    958:                                                                sub[i]->misc&=~SUB_INET; }
                    959:                             break;
                    960:                                                case 6:
                    961:                             n=1;
                    962:                             strcpy(opt[0],"Yes");
                    963:                             strcpy(opt[1],"No");
                    964:                             opt[2][0]=0;
                    965:                             SETHELP(WHERE);
                    966: /*
                    967: &Sub-board Networked via PostLink or PCRelay:&
                    968: 
                    969: If this sub-board is networked with other BBSs via PostLink or PCRelay,
                    970: this option should be set to &Yes&. With this option set to &Yes&,
                    971: titles of posts on this sub-board will be limited to the UTI
                    972: specification limitation of 25 characters. It also allows the &N&etwork
                    973: restriction to function properly.
                    974: */
                    975:                             n=ulist(WIN_SAV|WIN_MID,0,0,0,&n,0
                    976:                                 ,"Networked via PostLink or PCRelay",opt);
                    977:                             if(n==-1)
                    978:                                 break;
                    979:                             if(!n && !(sub[i]->misc&SUB_PNET)) {
                    980:                                 changes=1;
                    981:                                 sub[i]->misc|=SUB_PNET;
                    982:                                 break; }
                    983:                             if(n==1 && sub[i]->misc&SUB_PNET) {
                    984:                                 changes=1;
                    985:                                 sub[i]->misc&=~SUB_PNET; }
                    986:                             break;
                    987:                                                case 7:
                    988:                                                        n=1;
                    989:                                                        strcpy(opt[0],"Yes");
                    990:                                                        strcpy(opt[1],"No");
                    991:                                                        opt[2][0]=0;
                    992:                                                        SETHELP(WHERE);
                    993: /*
                    994: &Sub-board Networked via FidoNet EchoMail:&
                    995: 
                    996: If this sub-board is part of a FidoNet EchoMail conference, set this
                    997: option to &Yes&.
                    998: */
                    999:                                                        n=ulist(WIN_SAV|WIN_MID,0,0,0,&n,0
                   1000:                                                                ,"Networked via FidoNet EchoMail",opt);
                   1001:                                                        if(n==-1)
                   1002:                                 break;
                   1003:                                                        if(!n && !(sub[i]->misc&SUB_FIDO)) {
                   1004:                                                                changes=1;
                   1005:                                                                sub[i]->misc|=SUB_FIDO;
                   1006:                                                                break; }
                   1007:                                                        if(n==1 && sub[i]->misc&SUB_FIDO) {
                   1008:                                                                changes=1;
                   1009:                                                                sub[i]->misc&=~SUB_FIDO; }
                   1010:                             break;
                   1011:                                                case 8:
                   1012:                                                        strcpy(str,faddrtoa(sub[i]->faddr));
                   1013:                                                        SETHELP(WHERE);
                   1014: /*
                   1015: &Sub-board FidoNet Address:&
                   1016: 
                   1017: If this sub-board is part of a FidoNet EchoMail conference, this is
                   1018: the address used for this sub-board. Format: &Zone:Net/Node[.Point]&
                   1019: */
                   1020:                                                        uinput(WIN_MID|WIN_SAV,0,0,"FidoNet Address"
                   1021:                                                                ,str,20,K_EDIT);
                   1022:                                                        sub[i]->faddr=atofaddr(str);
                   1023:                                                        break;
                   1024:                                                case 9:
                   1025:                                                        SETHELP(WHERE);
                   1026: /*
                   1027: &Sub-board FidoNet Origin Line:&
                   1028: 
                   1029: If this sub-board is part of a FidoNet EchoMail conference and you
                   1030: want to use an origin line other than the default origin line in the
                   1031: &Networks& configuration, set this value to the desired origin line.
                   1032: 
                   1033: If this option is blank, the default origin line is used.
                   1034: */
                   1035:                                                        uinput(WIN_MID|WIN_SAV,0,0,nulstr,sub[i]->origline
                   1036:                                                                ,50,K_EDIT);
                   1037:                             break;
                   1038:                                                case 10:
                   1039:                                                        SETHELP(WHERE);
                   1040: /*
                   1041: &Sub-board EchoMail Storage Directory:&
                   1042: 
                   1043: This is the storage directory where FidoNet style (FTS-0001 stored
                   1044: message format) messages are imported from and exported to for this
                   1045: sub-board. If this option is blank, then the &EchoMail Base Directory& is
                   1046: used with the internal code of this sub-board as the sub-directory where
                   1047: the FidoNet messages are stored.
                   1048: */
                   1049: 
                   1050:                                                        uinput(WIN_MID|WIN_SAV,0,0
                   1051:                                                                ,"EchoMail Directory"
                   1052:                                                                ,sub[i]->echopath,50,K_UPPER|K_EDIT);
                   1053:                                                        break;
                   1054:                                                case 11:
                   1055: SETHELP(WHERE);
                   1056: /*
                   1057: &EchoMail Semaphore File:&
                   1058: 
                   1059: This is a filename that will be used as a semaphore (signal) to your
                   1060: FidoNet front-end that new EchoMail has been created and the messages
                   1061: should be re-scanned.
                   1062: */
                   1063:                                                        uinput(WIN_MID|WIN_SAV,0,17,"EchoMail Semaphore"
                   1064:                                                                ,sub[i]->echomail_sem,50,K_EDIT|K_UPPER);
                   1065:                                                        break; } }
                   1066:                                break;
                   1067:                        case 14:
                   1068:                                while(1) {
                   1069:                                        n=0;
                   1070:                                        if(sub[i]->qwkconf)
                   1071:                                                sprintf(str,"Static (%u)",sub[i]->qwkconf);
                   1072:                                        else
                   1073:                                                strcpy(str,"Dynamic");
                   1074:                                        sprintf(opt[n++],"%-27.27s%s","QWK Conference Number"
                   1075:                                                ,str);
                   1076:                                        sprintf(opt[n++],"%-27.27s%s","Storage Method"
                   1077:                                                ,sub[i]->misc&SUB_HYPER ? "Hyper Allocation"
                   1078:                                                : sub[i]->misc&SUB_FAST ? "Fast Allocation"
                   1079:                                                : "Self-packing");
                   1080:                                        if(!sub[i]->data_dir[0])
                   1081:                                                sprintf(str,"%sSUBS\\",data_dir);
                   1082:                                        else
                   1083:                                                strcpy(str,sub[i]->data_dir);
                   1084:                                        sprintf(opt[n++],"%-27.27s%.40s","Storage Directory",str);
                   1085:                                        opt[n][0]=0;
                   1086:                                        savnum=2;
                   1087:                                        SETHELP(WHERE);
                   1088: /*
                   1089: &Sub-board Advanced Options:&
                   1090: 
                   1091: This menu contains options for the selected sub-board that are advanced
                   1092: in nature.
                   1093: */
                   1094:                                        n=ulist(WIN_ACT|WIN_SAV|WIN_RHT|WIN_BOT,3,2,60,&adv_dflt,0
                   1095:                                                ,"Advanced Options",opt);
                   1096:                                        if(n==-1)
                   1097:                                                break;
                   1098:                                        savnum=3;
                   1099:                     switch(n) {
                   1100:                         case 0:
                   1101:                                                        SETHELP(WHERE);
                   1102: /*
                   1103: &Sub-board QWK Conference Number:&
                   1104: 
                   1105: If you wish to have the QWK conference number for this sub-board
                   1106: automatically generated by Synchronet (based on the group number
                   1107: and sub-board number for the user), set this option to &Dynamic&.
                   1108: 
                   1109: If you wish to have the same QWK conference number for this sub-board
                   1110: regardless of which user access it, set this option to &Static&
                   1111: by entering the conference number you want to use.
                   1112: */
                   1113:                                                        if(sub[i]->qwkconf)
                   1114:                                                                sprintf(str,"%u",sub[i]->qwkconf);
                   1115:                                                        else
                   1116:                                                                str[0]=0;
                   1117:                                                        if(uinput(WIN_MID|WIN_SAV,0,17
                   1118:                                                                ,"QWK Conference Number (0=Dynamic)"
                   1119:                                                                ,str,5,K_EDIT|K_NUMBER)>=0)
                   1120:                                                                sub[i]->qwkconf=atoi(str);
                   1121:                                                        break;
                   1122:                                                case 1:
                   1123:                                                        n=0;
                   1124:                                                        strcpy(opt[0],"Hyper Allocation");
                   1125:                                                        strcpy(opt[1],"Fast Allocation");
                   1126:                                                        strcpy(opt[2],"Self-packing");
                   1127:                                                        opt[3][0]=0;
                   1128:                                                        SETHELP(WHERE);
                   1129: /*
                   1130: &Self-Packing& is the slowest storage method because it conserves disk
                   1131:   space as it imports messages by using deleted message header and data
                   1132:   blocks for new messages automatically. If you use this storage method,
                   1133:   you will not need to run &SMBUTIL P& on this message base unless you
                   1134:   accumilate a large number of deleted message blocks and wish to free
                   1135:   that disk space. You can switch from self-packing to fast allocation
                   1136:   storage method and back again as you wish.
                   1137: &Fast Allocation& is faster than self-packing because it does not search
                   1138:   for deleted message blocks for new messages. It automatically places
                   1139:   all new message blocks at the end of the header and data files. If you
                   1140:   use this storage method, you will need to run &SMBUTIL P& on this
                   1141:   message base periodically or it will continually use up disk space.
                   1142: &Hyper Allocation& is the fastest storage method because it does not
                   1143:   maintain allocation files at all. Once a message base is setup to use
                   1144:   this storage method, it should not be changed without first deleting
                   1145:   the message base data files in your &DATA\DIRS\SUBS& directory for this
                   1146:   sub-board. You must use &SMBUTIL P& as with the fast allocation method.
                   1147: */
                   1148:                                                        n=ulist(WIN_SAV|WIN_MID,0,0,0,&n,0
                   1149:                                                                ,"Storage Method",opt);
                   1150:                                                        if(n==-1)
                   1151:                                                                break;
                   1152:                                                        if(!n && !(sub[i]->misc&SUB_HYPER)) {
                   1153:                                                                changes=1;
                   1154:                                                                sub[i]->misc|=SUB_HYPER;
                   1155:                                                                sub[i]->misc&=~SUB_FAST;
                   1156:                                                                sub[i]->misc|=SUB_HDRMOD;
                   1157:                                                                break; }
                   1158:                                                        if(!n)
                   1159:                                                                break;
                   1160:                                                        if(sub[i]->misc&SUB_HYPER) {    /* Switching from hyper */
                   1161:                                                                strcpy(opt[0],"Yes");
                   1162:                                                                strcpy(opt[1],"No, I want to use Hyper Allocation");
                   1163:                                                                opt[2][0]=0;
                   1164:                                                                m=0;
                   1165:                                                                if(ulist(WIN_SAV|WIN_MID,0,0,0,&m,0
                   1166:                                                                        ,"Delete all messages in this sub-board?",opt)!=0)
                   1167:                                                                        break;
                   1168:                                                                if(sub[i]->data_dir[0])
                   1169:                                                                        sprintf(str,"%s",sub[i]->data_dir);
                   1170:                                                                else
                   1171:                                                                        sprintf(str,"%sSUBS\\",data_dir);
                   1172:                                                                sprintf(str2,"%s.*",sub[i]->code);
                   1173:                                                                delfiles(str,str2); }
                   1174: 
                   1175:                                                        if(sub[i]->misc&SUB_HYPER)
                   1176:                                                                sub[i]->misc|=SUB_HDRMOD;
                   1177:                                                        if(n==1 && !(sub[i]->misc&SUB_FAST)) {
                   1178:                                                                changes=1;
                   1179:                                                                sub[i]->misc|=SUB_FAST;
                   1180:                                                                sub[i]->misc&=~SUB_HYPER;
                   1181:                                                                break; }
                   1182:                                                        if(n==2 && sub[i]->misc&(SUB_FAST|SUB_HYPER)) {
                   1183:                                                                changes=1;
                   1184:                                                                sub[i]->misc&=~(SUB_FAST|SUB_HYPER);
                   1185:                                                                break; }
                   1186:                                                        break;
                   1187:                                                case 2:
                   1188:                                                        SETHELP(WHERE);
                   1189: /*
                   1190: &Sub-board Storage Directory:&
                   1191: 
                   1192: Use this if you wish to place the data directory for this sub-board on
                   1193: another drive or in another directory besides the default setting.
                   1194: */
                   1195:                                                        uinput(WIN_MID|WIN_SAV,0,17,"Directory"
                   1196:                                                                ,sub[i]->data_dir,50,K_EDIT|K_UPPER);
                   1197:                                                        break; } }
                   1198:                                break;
                   1199:                                } } }
                   1200: }

unix.superglobalmegacorp.com

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