Annotation of sbbs/src/sbbs3/scfg/scfgsub.c, revision 1.1.1.1

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

unix.superglobalmegacorp.com

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