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

1.1       root        1: #line 2 "SCFGSYS.C"
                      2: 
                      3: /* Developed 1990-1997 by Rob Swindell; PO Box 501, Yorba Linda, CA 92885 */
                      4: 
                      5: #include "scfg.h"
                      6: 
                      7: void sys_cfg(void)
                      8: {
                      9:        static int sys_dflt,adv_dflt,tog_dflt,new_dflt;
                     10:        char str[81],str2[81],done=0,*dupehelp;
                     11:        int i,j,k,dflt,bar,savchanges;
                     12: 
                     13: while(1) {
                     14:        i=0;
                     15:        sprintf(opt[i++],"%-33.33s%s","BBS Name",sys_name);
                     16:        sprintf(opt[i++],"%-33.33s%s","Location",sys_location);
                     17:        sprintf(opt[i++],"%-33.33s%s","Operator",sys_op);
                     18:        sprintf(opt[i++],"%-33.33s%s","Password",sys_pass);
                     19: 
                     20:        sprintf(str,"%s Password"
                     21:                ,sys_misc&SM_PWEDIT && sys_pwdays ? "Users Must Change"
                     22:                : sys_pwdays ? "Users Get New Random" : "Users Can Change");
                     23:        if(sys_pwdays)
                     24:                sprintf(tmp,"Every %u Days",sys_pwdays);
                     25:        else if(sys_misc&SM_PWEDIT)
                     26:                strcpy(tmp,"Yes");
                     27:        else
                     28:                strcpy(tmp,"No");
                     29:        sprintf(opt[i++],"%-33.33s%s",str,tmp);
                     30: 
                     31:        sprintf(opt[i++],"%-33.33s%u","Days to Preserve Deleted Users"
                     32:                ,sys_deldays);
                     33:        sprintf(opt[i++],"%-33.33s%s","Maximum Days of Inactivity"
                     34:                ,sys_autodel ? itoa(sys_autodel,tmp,10) : "Unlimited");
                     35:     sprintf(opt[i++],"%-33.33s%s","New User Password",new_pass);
                     36: 
                     37:        strcpy(opt[i++],"Toggle Options...");
                     38:        strcpy(opt[i++],"New User Values...");
                     39:        strcpy(opt[i++],"Advanced Options...");
                     40:        strcpy(opt[i++],"Loadable Modules...");
                     41:        strcpy(opt[i++],"Security Level Values...");
                     42:        strcpy(opt[i++],"Expired Account Values...");
                     43:        strcpy(opt[i++],"Quick-Validation Values...");
                     44:        opt[i][0]=0;
                     45:        SETHELP(WHERE);
                     46: /*
                     47: &System Configuration:&
                     48: 
                     49: This menu contains options and sub-menus of options that affect the
                     50: entire system.
                     51: */
                     52:        switch(ulist(WIN_ORG|WIN_ACT|WIN_CHE,0,0,72,&sys_dflt,0
                     53:                ,"System Configuration",opt)) {
                     54:                case -1:
                     55:                        i=save_changes(WIN_MID);
                     56:                        if(i==-1)
                     57:                                break;
                     58:                        if(!i)
                     59:                                write_main_cfg();
                     60:                        return;
                     61:                case 0:
                     62:                        SETHELP(WHERE);
                     63: /*
                     64: &BBS Name:&
                     65: 
                     66: This is the name of the BBS.
                     67: */
                     68:                        uinput(WIN_MID,0,0,"BBS Name",sys_name,40,K_EDIT);
                     69:                        break;
                     70:                case 1:
                     71:                        SETHELP(WHERE);
                     72: /*
                     73: &System Location:&
                     74: 
                     75: This is the location of the BBS. The format is flexible, but it is
                     76: suggested you use the &City, State& format for clarity.
                     77: */
                     78:                        uinput(WIN_MID,0,0,"Location",sys_location,40,K_EDIT);
                     79:             break;
                     80:                case 2:
                     81:                        SETHELP(WHERE);
                     82: /*
                     83: &System Operator:&
                     84: 
                     85: This is the name or alias of the system operator. This does not have to
                     86: be the same as user #1. This field is used for documentary purposes
                     87: only.
                     88: */
                     89:                        uinput(WIN_MID,0,0,"System Operator",sys_op,40,K_EDIT);
                     90:                        break;
                     91:                case 3:
                     92:                        SETHELP(WHERE);
                     93: /*
                     94: &System Password:&
                     95: 
                     96: This is an extra security password required for sysop logon and certain
                     97: sysop functions. This password should be something not easily guessed
                     98: and should be kept absolutely confidential. This password must be
                     99: entered at the &SY:& prompt.
                    100: */
                    101:                        uinput(WIN_MID,0,0,"System Password",sys_pass,40,K_EDIT|K_UPPER);
                    102:                        break;
                    103:                case 4:
                    104:                        strcpy(opt[0],"Yes");
                    105:                        strcpy(opt[1],"No");
                    106:                        opt[2][0]=0;
                    107:                        i=1;
                    108:                        SETHELP(WHERE);
                    109: /*
                    110: &Allow Users to Change Their Password:&
                    111: 
                    112: If you want the users of your system to have the option of changing
                    113: their password to a string of their choice, set this option to &Yes&.
                    114: For the highest level of security, set this option to &No.&
                    115: */
                    116:                        i=ulist(WIN_MID|WIN_SAV,0,0,0,&i,0
                    117:                                ,"Allow Users to Change Their Password",opt);
                    118:                        if(!i && !(sys_misc&SM_PWEDIT)) {
                    119:                                sys_misc|=SM_PWEDIT;
                    120:                                changes=1; }
                    121:                        else if(i==1 && sys_misc&SM_PWEDIT) {
                    122:                 sys_misc&=~SM_PWEDIT;
                    123:                 changes=1; }
                    124:                        i=0;
                    125:                        SETHELP(WHERE);
                    126: /*
                    127: &Force Periodic Password Changes:&
                    128: 
                    129: If you want your users to be forced to change their passwords
                    130: periodically, select &Yes&.
                    131: */
                    132:                        i=ulist(WIN_MID|WIN_SAV,0,0,0,&i,0
                    133:                                ,"Force Periodic Password Changes",opt);
                    134:                        if(!i) {
                    135:                                itoa(sys_pwdays,str,10);
                    136:                        SETHELP(WHERE);
                    137: /*
                    138: &Maximum Days Between Password Changes:&
                    139: 
                    140: Enter the maximum number of days allowed between password changes.
                    141: If a user has not voluntarily changed his or her password in this
                    142: many days, he or she will be forced to change their password upon
                    143: logon.
                    144: */
                    145:                                uinput(WIN_MID,0,0,"Maximum Days Between Password Changes"
                    146:                                        ,str,5,K_NUMBER|K_EDIT);
                    147:                                sys_pwdays=atoi(str); }
                    148:                        else if(i==1 && sys_pwdays) {
                    149:                                sys_pwdays=0;
                    150:                                changes=1; }
                    151:                        
                    152:                        break;
                    153:                case 5:
                    154:                        sprintf(str,"%u",sys_deldays);
                    155:                        SETHELP(WHERE);
                    156: /*
                    157: &Days Since Last Logon to Preserve Deleted Users:&
                    158: 
                    159: Deleted user slots can be &undeleted& until the slot is written over
                    160: by a new user. If you want deleted user slots to be preserved for period
                    161: of time since their last logon, set this value to the number of days to
                    162: keep new users from taking over a deleted user's slot.
                    163: */
                    164:                        uinput(WIN_MID,0,0,"Days Since Last Logon to Preserve Deleted Users"
                    165:                                ,str,5,K_EDIT|K_NUMBER);
                    166:                        sys_deldays=atoi(str);
                    167:                        break;
                    168:                case 6:
                    169:                        sprintf(str,"%u",sys_autodel);
                    170:                        SETHELP(WHERE);
                    171: /*
                    172: &Maximum Days of Inactivity Before Auto-Deletion:&
                    173: 
                    174: If you want users that haven't logged on in certain period of time to
                    175: be automatically deleted, set this value to the maximum number of days
                    176: of inactivity before the user is deleted. Setting this value to &0&
                    177: disables this feature.
                    178: 
                    179: Users with the &P& exemption will not be deleted due to inactivity.
                    180: */
                    181:                        uinput(WIN_MID,0,0,"Maximum Days of Inactivity Before Auto-Deletion"
                    182:                                ,str,5,K_EDIT|K_NUMBER);
                    183:                        sys_autodel=atoi(str);
                    184:             break;
                    185:                case 7:
                    186:                        SETHELP(WHERE);
                    187: /*
                    188: &New User Password:&
                    189: 
                    190: If you want callers to only be able to logon as &New& if they know a
                    191: certain password, enter that password here. If you want any caller to
                    192: be able to logon as New, leave this option blank.
                    193: */
                    194:                        uinput(WIN_MID,0,0,"New User Password",new_pass,40
                    195:                                ,K_EDIT|K_UPPER);
                    196:                        break;
                    197:                case 8:    /* Toggle Options */
                    198:             done=0;
                    199:             while(!done) {
                    200:                 i=0;
                    201:                                sprintf(opt[i++],"%-33.33s%s","Allow Aliases"
                    202:                                        ,uq&UQ_ALIASES ? "Yes" : "No");
                    203:                                sprintf(opt[i++],"%-33.33s%s","Allow Time Banking"
                    204:                                        ,sys_misc&SM_TIMEBANK ? "Yes" : "No");
                    205:                                sprintf(opt[i++],"%-33.33s%s","Allow Credit Conversions"
                    206:                                        ,sys_misc&SM_NOCDTCVT ? "No" : "Yes");
                    207:                                sprintf(opt[i++],"%-33.33s%s","Allow Local Sysop Access"
                    208:                                        ,sys_misc&SM_L_SYSOP ? "Yes" : "No");
                    209:                                sprintf(opt[i++],"%-33.33s%s","Allow Remote Sysop Access"
                    210:                                        ,sys_misc&SM_R_SYSOP ? "Yes" : "No");
                    211:                                sprintf(opt[i++],"%-33.33s%s","Echo Passwords Locally"
                    212:                                        ,sys_misc&SM_ECHO_PW ? "Yes" : "No");
                    213:                                sprintf(opt[i++],"%-33.33s%s","Require Passwords Locally"
                    214:                                        ,sys_misc&SM_REQ_PW ? "Yes" : "No");
                    215:                                sprintf(opt[i++],"%-33.33s%s","Short Sysop Page"
                    216:                                        ,sys_misc&SM_SHRTPAGE ? "Yes" : "No");
                    217:                                sprintf(opt[i++],"%-33.33s%s","Sound Alarm on Error"
                    218:                                        ,sys_misc&SM_ERRALARM ? "Yes" : "No");
                    219:                 sprintf(opt[i++],"%-33.33s%s","Include Sysop in Statistics"
                    220:                     ,sys_misc&SM_SYSSTAT ? "Yes" : "No");
                    221:                 sprintf(opt[i++],"%-33.33s%s","Closed to New Users"
                    222:                     ,sys_misc&SM_CLOSED ? "Yes" : "No");
                    223:                 sprintf(opt[i++],"%-33.33s%s","Use Location in User Lists"
                    224:                                        ,sys_misc&SM_LISTLOC ? "Yes" : "No");
                    225:                                sprintf(opt[i++],"%-33.33s%s","Military (24 hour) Time Format"
                    226:                                        ,sys_misc&SM_MILITARY ? "Yes" : "No");
                    227:                                sprintf(opt[i++],"%-33.33s%s","European Date Format (DD/MM/YY)"
                    228:                                        ,sys_misc&SM_EURODATE ? "Yes" : "No");
                    229:                                sprintf(opt[i++],"%-33.33s%s","User Expires When Out-of-time"
                    230:                                        ,sys_misc&SM_TIME_EXP ? "Yes" : "No");
                    231:                                sprintf(opt[i++],"%-33.33s%s","Quick Validation Hot-Keys"
                    232:                                        ,sys_misc&SM_QVALKEYS ? "Yes" : "No");
                    233:                                opt[i][0]=0;
                    234:                                savnum=0;
                    235:                                SETHELP(WHERE);
                    236: /*
                    237: &System Toggle Options:&
                    238: 
                    239: This is a menu of system related options that can be toggled between
                    240: two or more states, such as &Yes& and &No&.
                    241: */
                    242:                                switch(ulist(WIN_ACT|WIN_BOT|WIN_RHT,0,0,41,&tog_dflt,0
                    243:                     ,"Toggle Options",opt)) {
                    244:                     case -1:
                    245:                         done=1;
                    246:                         break;
                    247:                                        case 0:
                    248:                                                strcpy(opt[0],"Yes");
                    249:                                                strcpy(opt[1],"No");
                    250:                                                opt[2][0]=0;
                    251:                                                i=0;
                    252:                                                SETHELP(WHERE);
                    253: /*
                    254: &Allow Users to Use Aliases:&
                    255: 
                    256: If you want the users of your system to be allowed to be known by a
                    257: false name, handle, or alias, set this option to &Yes&. If you want all
                    258: users on your system to be known only by their real names, select &No&.
                    259: */
                    260:                                                i=ulist(WIN_MID|WIN_SAV,0,0,0,&i,0
                    261:                                                        ,"Allow Users to Use Aliases",opt);
                    262:                                                if(!i && !(uq&UQ_ALIASES)) {
                    263:                                                        uq|=UQ_ALIASES;
                    264:                                                        changes=1; }
                    265:                                                else if(i==1 && uq&UQ_ALIASES) {
                    266:                                                        uq&=~UQ_ALIASES;
                    267:                                                        changes=1; }
                    268:                                                break;
                    269:                                        case 1:
                    270:                                                strcpy(opt[0],"Yes");
                    271:                                                strcpy(opt[1],"No");
                    272:                                                opt[2][0]=0;
                    273:                                                i=0;
                    274:                                                SETHELP(WHERE);
                    275: /*
                    276: &Allow Time Banking:&
                    277: 
                    278: If you want the users of your system to be allowed to be deposit
                    279: any extra time they may have left during a call into their minute bank,
                    280: set this option to &Yes&. If this option is set to &No&, then the only
                    281: way a user may get minutes in their minute bank is to purchase them
                    282: with credits.
                    283: */
                    284:                                                i=ulist(WIN_MID|WIN_SAV,0,0,0,&i,0
                    285:                                                        ,"Allow Users to Depost Time in Minute Bank",opt);
                    286:                                                if(!i && !(sys_misc&SM_TIMEBANK)) {
                    287:                                                        sys_misc|=SM_TIMEBANK;
                    288:                                                        changes=1; }
                    289:                                                else if(i==1 && sys_misc&SM_TIMEBANK) {
                    290:                                                        sys_misc&=~SM_TIMEBANK;
                    291:                                                        changes=1; }
                    292:                         break;
                    293:                                        case 2:
                    294:                                                strcpy(opt[0],"Yes");
                    295:                                                strcpy(opt[1],"No");
                    296:                                                opt[2][0]=0;
                    297:                                                i=0;
                    298:                                                SETHELP(WHERE);
                    299: /*
                    300: &Allow Credits to be Converted into Minutes:&
                    301: 
                    302: If you want the users of your system to be allowed to be convert
                    303: any credits they may have into minutes for their minute bank,
                    304: set this option to &Yes&.
                    305: */
                    306:                                                i=ulist(WIN_MID|WIN_SAV,0,0,0,&i,0
                    307:                                                        ,"Allow Users to Convert Credits into Minutes"
                    308:                                                        ,opt);
                    309:                                                if(!i && sys_misc&SM_NOCDTCVT) {
                    310:                                                        sys_misc&=~SM_NOCDTCVT;
                    311:                                                        changes=1; }
                    312:                                                else if(i==1 && !(sys_misc&SM_NOCDTCVT)) {
                    313:                                                        sys_misc|=SM_NOCDTCVT;
                    314:                                                        changes=1; }
                    315:                         break;
                    316:                                        case 3:
                    317:                                                strcpy(opt[0],"Yes");
                    318:                                                strcpy(opt[1],"No");
                    319:                                                opt[2][0]=0;
                    320:                                                i=0;
                    321:                                                SETHELP(WHERE);
                    322: /*
                    323: &Allow Local Sysop Access:&
                    324: 
                    325: If you want to be able to logon locally with sysop access, set this
                    326: option to &Yes&.
                    327: */
                    328:                                                i=ulist(WIN_MID|WIN_SAV,0,0,0,&i,0
                    329:                                                        ,"Allow Local Sysop Access",opt);
                    330:                                                if(!i && !(sys_misc&SM_L_SYSOP)) {
                    331:                                                        sys_misc|=SM_L_SYSOP;
                    332:                                                        changes=1; }
                    333:                                                else if(i==1 && sys_misc&SM_L_SYSOP) {
                    334:                                                        sys_misc&=~SM_L_SYSOP;
                    335:                                                        changes=1; }
                    336:                         break;
                    337:                                        case 4:
                    338:                                                strcpy(opt[0],"Yes");
                    339:                                                strcpy(opt[1],"No");
                    340:                                                opt[2][0]=0;
                    341:                                                i=0;
                    342:                                                SETHELP(WHERE);
                    343: /*
                    344: &Allow Remote Sysop Access:&
                    345: 
                    346: If you want to be able to logon remotely with sysop access, set this
                    347: option to &Yes&.
                    348: */
                    349:                                                i=ulist(WIN_MID|WIN_SAV,0,0,0,&i,0
                    350:                                                        ,"Allow Remote Sysop Access",opt);
                    351:                                                if(!i && !(sys_misc&SM_R_SYSOP)) {
                    352:                                                        sys_misc|=SM_R_SYSOP;
                    353:                                                        changes=1; }
                    354:                                                else if(i==1 && sys_misc&SM_R_SYSOP) {
                    355:                                                        sys_misc&=~SM_R_SYSOP;
                    356:                                                        changes=1; }
                    357:                         break;
                    358:                                        case 5:
                    359:                                                strcpy(opt[0],"Yes");
                    360:                                                strcpy(opt[1],"No");
                    361:                                                opt[2][0]=0;
                    362:                                                i=0;
                    363:                                                SETHELP(WHERE);
                    364: /*
                    365: &Echo Passwords Locally:&
                    366: 
                    367: If you want to passwords to be displayed locally, set this option to
                    368: &Yes&.
                    369: */
                    370:                                                i=ulist(WIN_MID|WIN_SAV,0,0,0,&i,0
                    371:                                                        ,"Echo Passwords Locally",opt);
                    372:                                                if(!i && !(sys_misc&SM_ECHO_PW)) {
                    373:                                                        sys_misc|=SM_ECHO_PW;
                    374:                                                        changes=1; }
                    375:                                                else if(i==1 && sys_misc&SM_ECHO_PW) {
                    376:                                                        sys_misc&=~SM_ECHO_PW;
                    377:                                                        changes=1; }
                    378:                         break;
                    379:                                        case 6:
                    380:                                                strcpy(opt[0],"Yes");
                    381:                                                strcpy(opt[1],"No");
                    382:                                                opt[2][0]=0;
                    383:                                                i=0;
                    384:                                                SETHELP(WHERE);
                    385: /*
                    386: &Require Passwords Locally:&
                    387: 
                    388: If you want to passwords to be required when logged on locally, set this
                    389: option to &Yes&.
                    390: */
                    391:                                                i=ulist(WIN_MID|WIN_SAV,0,0,0,&i,0
                    392:                                                        ,"Require Passwords Locally",opt);
                    393:                                                if(!i && !(sys_misc&SM_REQ_PW)) {
                    394:                                                        sys_misc|=SM_REQ_PW;
                    395:                                                        changes=1; }
                    396:                                                else if(i==1 && sys_misc&SM_REQ_PW) {
                    397:                                                        sys_misc&=~SM_REQ_PW;
                    398:                                                        changes=1; }
                    399:                         break;
                    400:                                        case 7:
                    401:                         strcpy(opt[0],"Yes");
                    402:                         strcpy(opt[1],"No");
                    403:                                                opt[2][0]=0;
                    404:                         i=0;
                    405:                                                SETHELP(WHERE);
                    406: /*
                    407: &Short Sysop Page:&
                    408: 
                    409: If you would like the sysop page to be a short series of beeps rather
                    410: than continuous random tones, set this option to &Yes&.
                    411: */
                    412:                                                i=ulist(WIN_MID|WIN_SAV,0,0,0,&i,0,"Short Sysop Page"
                    413:                                                        ,opt);
                    414:                                                if(i==1 && sys_misc&SM_SHRTPAGE) {
                    415:                                                        sys_misc&=~SM_SHRTPAGE;
                    416:                             changes=1; }
                    417:                                                else if(!i && !(sys_misc&SM_SHRTPAGE)) {
                    418:                                                        sys_misc|=SM_SHRTPAGE;
                    419:                             changes=1; }
                    420:                                                break;
                    421:                                        case 8:
                    422:                         strcpy(opt[0],"Yes");
                    423:                         strcpy(opt[1],"No");
                    424:                                                opt[2][0]=0;
                    425:                         i=0;
                    426:                                                SETHELP(WHERE);
                    427: /*
                    428: &Sound Alarm on Error:&
                    429: 
                    430: If you would like to have an alarm sounded locally when a critical
                    431: system error has occured, set this option to &Yes&.
                    432: */
                    433:                                                i=ulist(WIN_MID|WIN_SAV,0,0,0,&i,0
                    434:                                                        ,"Sound Alarm on Error",opt);
                    435:                                                if(i==1 && sys_misc&SM_ERRALARM) {
                    436:                                                        sys_misc&=~SM_ERRALARM;
                    437:                             changes=1; }
                    438:                                                else if(!i && !(sys_misc&SM_ERRALARM)) {
                    439:                                                        sys_misc|=SM_ERRALARM;
                    440:                             changes=1; }
                    441:                         break;
                    442:                                        case 9:
                    443:                         strcpy(opt[0],"Yes");
                    444:                         strcpy(opt[1],"No");
                    445:                                                opt[2][0]=0;
                    446:                         i=1;
                    447:                                                SETHELP(WHERE);
                    448: /*
                    449: &Include Sysop Activity in System Statistics:&
                    450: 
                    451: If you want sysops to be included in the statistical data of the BBS,
                    452: set this option to &Yes&. The suggested setting for this option is
                    453: &No& so that statistical data will only reflect user usage and not
                    454: include sysop maintenance activity.
                    455: */
                    456:                                                i=ulist(WIN_MID|WIN_SAV,0,0,0,&i,0
                    457:                                                        ,"Include Sysop Activity in System Statistics"
                    458:                                                        ,opt);
                    459:                         if(!i && !(sys_misc&SM_SYSSTAT)) {
                    460:                             sys_misc|=SM_SYSSTAT;
                    461:                             changes=1; }
                    462:                         else if(i==1 && sys_misc&SM_SYSSTAT) {
                    463:                             sys_misc&=~SM_SYSSTAT;
                    464:                             changes=1; }
                    465:                         break;
                    466:                                        case 10:
                    467:                         strcpy(opt[0],"Yes");
                    468:                         strcpy(opt[1],"No");
                    469:                                                opt[2][0]=0;
                    470:                         i=1;
                    471:                                                SETHELP(WHERE);
                    472: /*
                    473: &Closed to New Users:&
                    474: 
                    475: If you want callers to be able to logon as &New&, set this option to &No&.
                    476: */
                    477:                                                i=ulist(WIN_MID|WIN_SAV,0,0,0,&i,0
                    478:                                                        ,"Closed to New Users",opt);
                    479:                         if(!i && !(sys_misc&SM_CLOSED)) {
                    480:                             sys_misc|=SM_CLOSED;
                    481:                             changes=1; }
                    482:                         else if(i==1 && sys_misc&SM_CLOSED) {
                    483:                             sys_misc&=~SM_CLOSED;
                    484:                             changes=1; }
                    485:                         break;
                    486:                                        case 11:
                    487:                         strcpy(opt[0],"Yes");
                    488:                         strcpy(opt[1],"No");
                    489:                                                opt[2][0]=0;
                    490:                         i=0;
                    491:                                                SETHELP(WHERE);
                    492: /*
                    493: &User Location in User Lists:&
                    494: 
                    495: If you want user locations (city, state) displayed in the user lists,
                    496: set this option to &Yes&. If this option is set to &No&, the user notes
                    497: (if they exist) are displayed in the user lists.
                    498: */
                    499:                                                i=ulist(WIN_MID|WIN_SAV,0,0,0,&i,0
                    500:                             ,"User Location (Instead of Note) in User Lists"
                    501:                             ,opt);
                    502:                                                if(!i && !(sys_misc&SM_LISTLOC)) {
                    503:                                                        sys_misc|=SM_LISTLOC;
                    504:                             changes=1; }
                    505:                                                else if(i==1 && sys_misc&SM_LISTLOC) {
                    506:                                                        sys_misc&=~SM_LISTLOC;
                    507:                             changes=1; }
                    508:                         break;
                    509:                                        case 12:
                    510:                         strcpy(opt[0],"Yes");
                    511:                         strcpy(opt[1],"No");
                    512:                                                opt[2][0]=0;
                    513:                                                i=1;
                    514:                                                SETHELP(WHERE);
                    515: /*
                    516: &Military:&
                    517: 
                    518: If you would like the time-of-day to be displayed and entered in 24 hour
                    519: format always, set this option to &Yes&.
                    520: */
                    521:                                                i=ulist(WIN_MID|WIN_SAV,0,0,0,&i,0
                    522:                                                        ,"Use Military Time Format",opt);
                    523:                                                if(!i && !(sys_misc&SM_MILITARY)) {
                    524:                                                        sys_misc|=SM_MILITARY;
                    525:                             changes=1; }
                    526:                                                else if(i==1 && sys_misc&SM_MILITARY) {
                    527:                                                        sys_misc&=~SM_MILITARY;
                    528:                             changes=1; }
                    529:                         break;
                    530:                                        case 13:
                    531:                         strcpy(opt[0],"Yes");
                    532:                         strcpy(opt[1],"No");
                    533:                                                opt[2][0]=0;
                    534:                                                i=1;
                    535:                                                SETHELP(WHERE);
                    536: /*
                    537: &European Date Format:&
                    538: 
                    539: If you would like dates to be displayed and entered in &DD/MM/YY& format
                    540: instead of &MM/DD/YY& format, set this option to &Yes&.
                    541: */
                    542:                                                i=ulist(WIN_MID|WIN_SAV,0,0,0,&i,0
                    543:                                                        ,"European Date Format",opt);
                    544:                                                if(!i && !(sys_misc&SM_EURODATE)) {
                    545:                                                        sys_misc|=SM_EURODATE;
                    546:                             changes=1; }
                    547:                                                else if(i==1 && sys_misc&SM_EURODATE) {
                    548:                                                        sys_misc&=~SM_EURODATE;
                    549:                             changes=1; }
                    550:                         break;
                    551: 
                    552:                                        case 14:
                    553:                         strcpy(opt[0],"Yes");
                    554:                         strcpy(opt[1],"No");
                    555:                                                opt[2][0]=0;
                    556:                                                i=1;
                    557:                                                SETHELP(WHERE);
                    558: /*
                    559: &User Expires When Out-of-time:&
                    560: 
                    561: If you want users to be set to &Expired User Values& if they run out of
                    562: time online, then set this option to &Yes&.
                    563: */
                    564:                                                i=ulist(WIN_MID|WIN_SAV,0,0,0,&i,0
                    565:                                                        ,"User Expires When Out-of-time",opt);
                    566:                                                if(!i && !(sys_misc&SM_TIME_EXP)) {
                    567:                                                        sys_misc|=SM_TIME_EXP;
                    568:                             changes=1; }
                    569:                                                else if(i==1 && sys_misc&SM_TIME_EXP) {
                    570:                                                        sys_misc&=~SM_TIME_EXP;
                    571:                             changes=1; }
                    572:                         break;
                    573: 
                    574:                                        case 15:
                    575:                         strcpy(opt[0],"Yes");
                    576:                         strcpy(opt[1],"No");
                    577:                                                opt[2][0]=0;
                    578:                                                i=1;
                    579:                                                SETHELP(WHERE);
                    580: /*
                    581: &Quick Validation Hot-Keys:&
                    582: 
                    583: If you would like to enable the &Alt-#& hot-keys for quick user
                    584: validation, set this option to &Yes&.
                    585: */
                    586:                                                i=ulist(WIN_MID|WIN_SAV,0,0,0,&i,0
                    587:                                                        ,"Quick Validation Hot-Keys",opt);
                    588:                                                if(!i && !(sys_misc&SM_QVALKEYS)) {
                    589:                                                        sys_misc|=SM_QVALKEYS;
                    590:                             changes=1; }
                    591:                                                else if(i==1 && sys_misc&SM_QVALKEYS) {
                    592:                                                        sys_misc&=~SM_QVALKEYS;
                    593:                             changes=1; }
                    594:                         break;
                    595: 
                    596:                                                } }
                    597:             break;
                    598:                case 9:    /* New User Values */
                    599:                        done=0;
                    600:                        while(!done) {
                    601:                                i=0;
                    602:                                sprintf(opt[i++],"%-27.27s%u","Level",new_level);
                    603:                                sprintf(opt[i++],"%-27.27s%s","Flag Set #1"
                    604:                                        ,ltoaf(new_flags1,str));
                    605:                                sprintf(opt[i++],"%-27.27s%s","Flag Set #2"
                    606:                                        ,ltoaf(new_flags2,str));
                    607:                                sprintf(opt[i++],"%-27.27s%s","Flag Set #3"
                    608:                                        ,ltoaf(new_flags3,str));
                    609:                                sprintf(opt[i++],"%-27.27s%s","Flag Set #4"
                    610:                                        ,ltoaf(new_flags4,str));
                    611:                                sprintf(opt[i++],"%-27.27s%s","Exemptions"
                    612:                                        ,ltoaf(new_exempt,str));
                    613:                                sprintf(opt[i++],"%-27.27s%s","Restrictions"
                    614:                                        ,ltoaf(new_rest,str));
                    615:                                sprintf(opt[i++],"%-27.27s%s","Expiration Days"
                    616:                                        ,itoa(new_expire,str,10));
                    617: 
                    618:                                ultoac(new_cdt,str);
                    619:                                sprintf(opt[i++],"%-27.27s%s","Credits",str);
                    620:                                ultoac(new_min,str);
                    621:                                sprintf(opt[i++],"%-27.27s%s","Minutes",str);
                    622:                                sprintf(opt[i++],"%-27.27s%s","Editor"
                    623:                                        ,new_xedit);
                    624:                                sprintf(opt[i++],"%-27.27s%s","Command Shell"
                    625:                                        ,shell[new_shell]->code);
                    626:                                if(new_prot!=SP)
                    627:                     sprintf(str,"%c",new_prot);
                    628:                 else
                    629:                     strcpy(str,"None");
                    630:                                sprintf(opt[i++],"%-27.27s%s","Download Protocol",str);
                    631:                                strcpy(opt[i++],"Default Toggles...");
                    632:                                strcpy(opt[i++],"Question Toggles...");
                    633:                                opt[i][0]=0;
                    634:                                SETHELP(WHERE);
                    635: /*
                    636: &New User Values:&
                    637: 
                    638: This menu allows you to determine the default settings for new users.
                    639: */
                    640:                                switch(ulist(WIN_ACT|WIN_BOT|WIN_RHT,0,0,60,&new_dflt,0
                    641:                                        ,"New User Values",opt)) {
                    642:                                        case -1:
                    643:                                                done=1;
                    644:                                                break;
                    645:                                        case 0:
                    646:                                                itoa(new_level,str,10);
                    647:                                                SETHELP(WHERE);
                    648: /*
                    649: &New User Security Level:&
                    650: 
                    651: This is the security level automatically given to new users.
                    652: */
                    653:                                                uinput(WIN_SAV|WIN_MID,0,0,"Security Level"
                    654:                                                        ,str,2,K_EDIT|K_NUMBER);
                    655:                                                new_level=atoi(str);
                    656:                                                break;
                    657:                                        case 1:
                    658:                                                ltoaf(new_flags1,str);
                    659:                                                SETHELP(WHERE);
                    660: /*
                    661: &New User Security Flags:&
                    662: 
                    663: These are the security flags automatically given to new users.
                    664: */
                    665:                                                uinput(WIN_SAV|WIN_MID,0,0,"Flag Set #1"
                    666:                                                        ,str,26,K_EDIT|K_UPPER|K_ALPHA);
                    667:                                                new_flags1=aftol(str);
                    668:                                                break;
                    669:                                        case 2:
                    670:                                                ltoaf(new_flags2,str);
                    671:                                                SETHELP(WHERE);
                    672: /*
                    673: &New User Security Flags:&
                    674: 
                    675: These are the security flags automatically given to new users.
                    676: */
                    677:                                                uinput(WIN_SAV|WIN_MID,0,0,"Flag Set #2"
                    678:                                                        ,str,26,K_EDIT|K_UPPER|K_ALPHA);
                    679:                                                new_flags2=aftol(str);
                    680:                         break;
                    681:                                        case 3:
                    682:                                                ltoaf(new_flags3,str);
                    683:                                                SETHELP(WHERE);
                    684: /*
                    685: &New User Security Flags:&
                    686: 
                    687: These are the security flags automatically given to new users.
                    688: */
                    689:                                                uinput(WIN_SAV|WIN_MID,0,0,"Flag Set #3"
                    690:                                                        ,str,26,K_EDIT|K_UPPER|K_ALPHA);
                    691:                                                new_flags3=aftol(str);
                    692:                         break;
                    693:                                        case 4:
                    694:                                                ltoaf(new_flags4,str);
                    695:                                                SETHELP(WHERE);
                    696: /*
                    697: &New User Security Flags:&
                    698: 
                    699: These are the security flags automatically given to new users.
                    700: */
                    701:                                                uinput(WIN_SAV|WIN_MID,0,0,"Flag Set #4"
                    702:                                                        ,str,26,K_EDIT|K_UPPER|K_ALPHA);
                    703:                                                new_flags4=aftol(str);
                    704:                         break;
                    705:                                        case 5:
                    706:                                                ltoaf(new_exempt,str);
                    707:                                                SETHELP(WHERE);
                    708: /*
                    709: &New User Exemption Flags:&
                    710: 
                    711: These are the exemptions that are automatically given to new users.
                    712: */
                    713:                                                uinput(WIN_SAV|WIN_MID,0,0,"Exemption Flags",str,26
                    714:                                                        ,K_EDIT|K_UPPER|K_ALPHA);
                    715:                                                new_exempt=aftol(str);
                    716:                                                break;
                    717:                                        case 6:
                    718:                                                ltoaf(new_rest,str);
                    719:                                                SETHELP(WHERE);
                    720: /*
                    721: &New User Restriction Flags:&
                    722: 
                    723: These are the restrictions that are automatically given to new users.
                    724: */
                    725:                                                uinput(WIN_SAV|WIN_MID,0,0,"Restriction Flags",str,26
                    726:                                                        ,K_EDIT|K_UPPER|K_ALPHA);
                    727:                                                new_rest=aftol(str);
                    728:                                                break;
                    729:                                        case 7:
                    730:                                                itoa(new_expire,str,10);
                    731:                                                SETHELP(WHERE);
                    732: /*
                    733: &New User Expiration Days:&
                    734: 
                    735: If you wish new users to have an automatic expiration date, set this
                    736: value to the number of days before the user will expire. To disable
                    737: New User expiration, set this value to &0&.
                    738: */
                    739:                                                uinput(WIN_SAV|WIN_MID,0,0,"Expiration Days",str,4
                    740:                                                        ,K_EDIT|K_NUMBER);
                    741:                                                new_expire=atoi(str);
                    742:                                                break;
                    743:                                        case 8:
                    744:                                                ultoa(new_cdt,str,10);
                    745:                                                SETHELP(WHERE);
                    746: /*
                    747: &New User Credits:&
                    748: 
                    749: This is the amount of credits that are automatically given to new users.
                    750: */
                    751:                                                uinput(WIN_SAV|WIN_MID,0,0,"Credits",str,10
                    752:                                                        ,K_EDIT|K_NUMBER);
                    753:                                                new_cdt=atol(str);
                    754:                         break;
                    755:                                        case 9:
                    756:                                                ultoa(new_min,str,10);
                    757:                                                SETHELP(WHERE);
                    758: /*
                    759: &New User Minutes:&
                    760: 
                    761: This is the number of extra minutes automatically given to new users.
                    762: */
                    763:                                                uinput(WIN_SAV|WIN_MID,0,0,"Minutes (Time Credit)"
                    764:                                                        ,str,10,K_EDIT|K_NUMBER);
                    765:                                                new_min=atol(str);
                    766:                                                break;
                    767:                                        case 10:
                    768:                                                if(!total_xedits) {
                    769:                                                        umsg("No External Editors Configured");
                    770:                                                        break; }
                    771:                                                strcpy(opt[0],"Internal");
                    772:                                                for(i=1;i<=total_xedits;i++)
                    773:                                                        strcpy(opt[i],xedit[i-1]->code);
                    774:                                                opt[i][0]=0;
                    775:                                                i=0;
                    776:                                                savnum=0;
                    777:                                                SETHELP(WHERE);
                    778: /*
                    779: &New User Editor:&
                    780: 
                    781: You can use this option to select the default editor for new users.
                    782: */
                    783:                                                i=ulist(WIN_SAV|WIN_RHT,2,1,13,&i,0,"Editors",opt);
                    784:                                                if(i==-1)
                    785:                                                        break;
                    786:                                                changes=1;
                    787:                                                if(i && i<=total_xedits)
                    788:                                                        sprintf(new_xedit,"%-.8s",xedit[i-1]->code);
                    789:                                                else
                    790:                                                        new_xedit[0]=0;
                    791:                                                break;
                    792:                                        case 11:
                    793:                                                for(i=0;i<total_shells && i<MAX_OPTS;i++)
                    794:                                                        sprintf(opt[i],"%-.8s",shell[i]->code);
                    795:                                                opt[i][0]=0;
                    796:                                                i=0;
                    797:                                                savnum=0;
                    798:                                                SETHELP(WHERE);
                    799: /*
                    800: &New User Command Shell:&
                    801: 
                    802: You can use this option to select the default command shell for new
                    803: users.
                    804: */
                    805:                                                i=ulist(WIN_SAV|WIN_RHT,2,1,13,&i,0
                    806:                                                        ,"Command Shells",opt);
                    807:                                                if(i==-1)
                    808:                                                        break;
                    809:                                                new_shell=i;
                    810:                                                changes=1;
                    811:                                                break;
                    812:                                        case 12:
                    813:                                                SETHELP(WHERE);
                    814: /*
                    815: &New User Default Download Protocol:&
                    816: 
                    817: This option allows you to set the default download protocol of new users
                    818: (protocol command key or &BLANK& for no default).
                    819: */
                    820:                                                sprintf(str,"%c",new_prot);
                    821:                                                uinput(WIN_SAV|WIN_MID,0,0
                    822:                                                        ,"Default Download Protocol (SPACE=Disabled)"
                    823:                                                        ,str,1,K_EDIT|K_UPPER);
                    824:                                                new_prot=str[0];
                    825:                                                if(new_prot<SP)
                    826:                                                        new_prot=SP;
                    827:                         break;
                    828:                                        case 13:
                    829:                                                SETHELP(WHERE);
                    830: /*
                    831: &New User Default Toggle Options:&
                    832: 
                    833: This menu contains the default state of new user toggle options. All new
                    834: users on your system will have their defaults set according to the
                    835: settings on this menu. The user can then change them to his or her
                    836: liking.
                    837: 
                    838: See the Synchronet User Manual for more information on the individual
                    839: options available.
                    840: */
                    841:                                                j=0;
                    842:                         while(1) {
                    843:                             i=0;
                    844:                                                        sprintf(opt[i++],"%-27.27s %-3.3s"
                    845:                                                                ,"Expert Menu Mode"
                    846:                                                                ,new_misc&EXPERT ? "Yes":"No");
                    847:                                                        sprintf(opt[i++],"%-27.27s %-3.3s"
                    848:                                                                ,"Screen Pause"
                    849:                                                                ,new_misc&UPAUSE ? "Yes":"No");
                    850:                                                        sprintf(opt[i++],"%-27.27s %-3.3s"
                    851:                                                                ,"Spinning Cursor"
                    852:                                                                ,new_misc&SPIN ? "Yes":"No");
                    853:                                                        sprintf(opt[i++],"%-27.27s %-3.3s"
                    854:                                                                ,"Clear Screen"
                    855:                                                                ,new_misc&CLRSCRN ? "Yes":"No");
                    856:                                                        sprintf(opt[i++],"%-27.27s %-3.3s"
                    857:                                                                ,"Ask For New Scan"
                    858:                                                                ,new_misc&ASK_NSCAN ? "Yes":"No");
                    859:                                                        sprintf(opt[i++],"%-27.27s %-3.3s"
                    860:                                                                ,"Ask For Your Msg Scan"
                    861:                                                                ,new_misc&ASK_SSCAN ? "Yes":"No");
                    862:                                                        sprintf(opt[i++],"%-27.27s %-3.3s"
                    863:                                                                ,"Automatic New File Scan"
                    864:                                                                ,new_misc&ANFSCAN ? "Yes":"No");
                    865:                                                        sprintf(opt[i++],"%-27.27s %-3.3s"
                    866:                                                                ,"Remember Current Sub-board"
                    867:                                                                ,new_misc&CURSUB ? "Yes":"No");
                    868:                                                        sprintf(opt[i++],"%-27.27s %-3.3s"
                    869:                                                                ,"Batch Download File Flag"
                    870:                                                                ,new_misc&BATCHFLAG ? "Yes":"No");
                    871:                                                        sprintf(opt[i++],"%-27.27s %-3.3s"
                    872:                                                                ,"Extended File Descriptions"
                    873:                                                                ,new_misc&EXTDESC ? "Yes":"No");
                    874:                                                        sprintf(opt[i++],"%-27.27s %-3.3s"
                    875:                                                                ,"Hot Keys"
                    876:                                                                ,new_misc&COLDKEYS ? "No":"Yes");
                    877:                                                        sprintf(opt[i++],"%-27.27s %-3.3s"
                    878:                                                                ,"Auto Hang-up After Xfer"
                    879:                                                                ,new_misc&AUTOHANG ? "Yes":"No");
                    880:                                                        opt[i][0]=0;
                    881:                                                        j=ulist(WIN_BOT|WIN_RHT,2,1,0,&j,0
                    882:                                                                ,"Default Toggle Options",opt);
                    883:                             if(j==-1)
                    884:                                 break;
                    885:                             changes=1;
                    886:                             switch(j) {
                    887:                                 case 0:
                    888:                                                                        new_misc^=EXPERT;
                    889:                                     break;
                    890:                                                                case 1:
                    891:                                                                        new_misc^=UPAUSE;
                    892:                                                                        break;
                    893:                                                                case 2:
                    894:                                                                        new_misc^=SPIN;
                    895:                                                                        break;
                    896:                                                                case 3:
                    897:                                                                        new_misc^=CLRSCRN;
                    898:                                                                        break;
                    899:                                                                case 4:
                    900:                                                                        new_misc^=ASK_NSCAN;
                    901:                                                                        break;
                    902:                                                                case 5:
                    903:                                                                        new_misc^=ASK_SSCAN;
                    904:                                     break;
                    905:                                                                case 6:
                    906:                                                                        new_misc^=ANFSCAN;
                    907:                                                                        break;
                    908:                                                                case 7:
                    909:                                                                        new_misc^=CURSUB;
                    910:                                                                        break;
                    911:                                                                case 8:
                    912:                                                                        new_misc^=BATCHFLAG;
                    913:                                                                        break;
                    914:                                                                case 9:
                    915:                                                                        new_misc^=EXTDESC;
                    916:                                     break;
                    917:                                                                case 10:
                    918:                                                                        new_misc^=COLDKEYS;
                    919:                                     break;
                    920:                                                                case 11:
                    921:                                                                        new_misc^=AUTOHANG;
                    922:                                     break;
                    923:                                                                        } }
                    924:                                                break;
                    925:                                        case 14:
                    926:                                                SETHELP(WHERE);
                    927: /*
                    928: &New User Question Toggle Options:&
                    929: 
                    930: This menu allows you to decide which questions will be asked of a new
                    931: user.
                    932: */
                    933:                                                j=0;
                    934:                         while(1) {
                    935:                             i=0;
                    936:                                                        sprintf(opt[i++],"%-27.27s %-3.3s"
                    937:                                                                ,"Real Name"
                    938:                                                                ,uq&UQ_REALNAME ? "Yes":"No");
                    939:                                                        sprintf(opt[i++],"%-27.27s %-3.3s"
                    940:                                                                ,"Force Unique Real Name"
                    941:                                                                ,uq&UQ_DUPREAL ? "Yes":"No");
                    942:                                                        sprintf(opt[i++],"%-27.27s %-3.3s"
                    943:                                                                ,"Company Name"
                    944:                                                                ,uq&UQ_COMPANY ? "Yes":"No");
                    945:                                                        sprintf(opt[i++],"%-27.27s %-3.3s"
                    946:                                                                ,"Multinode Chat Handle"
                    947:                                                                ,uq&UQ_HANDLE ? "Yes":"No");
                    948:                                                        sprintf(opt[i++],"%-27.27s %-3.3s"
                    949:                                                                ,"Force Unique Chat Handle"
                    950:                                                                ,uq&UQ_DUPHAND ? "Yes":"No");
                    951:                                                        sprintf(opt[i++],"%-27.27s %-3.3s"
                    952:                                                                ,"Sex (Gender)"
                    953:                                                                ,uq&UQ_SEX ? "Yes":"No");
                    954:                                                        sprintf(opt[i++],"%-27.27s %-3.3s"
                    955:                                                                ,"Birthday"
                    956:                                                                ,uq&UQ_BIRTH ? "Yes":"No");
                    957:                                                        sprintf(opt[i++],"%-27.27s %-3.3s"
                    958:                                                                ,"Address and Zip Code"
                    959:                                                                ,uq&UQ_ADDRESS ? "Yes":"No");
                    960:                                                        sprintf(opt[i++],"%-27.27s %-3.3s"
                    961:                                                                ,"Location"
                    962:                                                                ,uq&UQ_LOCATION ? "Yes":"No");
                    963:                                                        sprintf(opt[i++],"%-27.27s %-3.3s"
                    964:                                                                ,"Require Comma in Location"
                    965:                                                                ,uq&UQ_NOCOMMAS ? "No":"Yes");
                    966:                                                        sprintf(opt[i++],"%-27.27s %-3.3s"
                    967:                                                                ,"Phone Number"
                    968:                                                                ,uq&UQ_PHONE ? "Yes":"No");
                    969:                                                        sprintf(opt[i++],"%-27.27s %-3.3s"
                    970:                                                                ,"Computer Type"
                    971:                                                                ,uq&UQ_COMP ? "Yes":"No");
                    972:                                                        sprintf(opt[i++],"%-27.27s %-3.3s"
                    973:                                                                ,"Multiple Choice Computer"
                    974:                                                                ,uq&UQ_MC_COMP ? "Yes":"No");
                    975:                                                        sprintf(opt[i++],"%-27.27s %-3.3s"
                    976:                                                                ,"Allow EX-ASCII in Answers"
                    977:                                                                ,uq&UQ_NOEXASC ? "No":"Yes");
                    978:                                                        sprintf(opt[i++],"%-27.27s %-3.3s"
                    979:                                                                ,"External Editor"
                    980:                                                                ,uq&UQ_XEDIT ? "Yes":"No");
                    981:                                                        sprintf(opt[i++],"%-27.27s %-3.3s"
                    982:                                                                ,"Command Shell"
                    983:                                                                ,uq&UQ_CMDSHELL ? "Yes":"No");
                    984:                                                        sprintf(opt[i++],"%-27.27s %-3.3s"
                    985:                                                                ,"Default Settings"
                    986:                                                                ,uq&UQ_NODEF ? "No":"Yes");
                    987:                                                        opt[i][0]=0;
                    988:                                                        j=ulist(WIN_BOT|WIN_RHT|WIN_SAV,2,1,0,&j,0
                    989:                                                                ,"New User Questions",opt);
                    990:                             if(j==-1)
                    991:                                 break;
                    992:                             changes=1;
                    993:                             switch(j) {
                    994:                                 case 0:
                    995:                                                                        uq^=UQ_REALNAME;
                    996:                                     break;
                    997:                                                                case 1:
                    998:                                                                        uq^=UQ_DUPREAL;
                    999:                                                                        break;
                   1000:                                                                case 2:
                   1001:                                                                        uq^=UQ_COMPANY;
                   1002:                                     break;
                   1003:                                                                case 3:
                   1004:                                                                        uq^=UQ_HANDLE;
                   1005:                                     break;
                   1006:                                                                case 4:
                   1007:                                                                        uq^=UQ_DUPHAND;
                   1008:                                                                        break;
                   1009:                                                                case 5:
                   1010:                                                                        uq^=UQ_SEX;
                   1011:                                                                        break;
                   1012:                                                                case 6:
                   1013:                                                                        uq^=UQ_BIRTH;
                   1014:                                                                        break;
                   1015:                                                                case 7:
                   1016:                                                                        uq^=UQ_ADDRESS;
                   1017:                                                                        break;
                   1018:                                                                case 8:
                   1019:                                                                        uq^=UQ_LOCATION;
                   1020:                                                                        break;
                   1021:                                                                case 9:
                   1022:                                                                        uq^=UQ_NOCOMMAS;
                   1023:                                                                        break;
                   1024:                                                                case 10:
                   1025:                                                                        uq^=UQ_PHONE;
                   1026:                                                                        break;
                   1027:                                                                case 11:
                   1028:                                                                        uq^=UQ_COMP;
                   1029:                                                                        break;
                   1030:                                                                case 12:
                   1031:                                                                        uq^=UQ_MC_COMP;
                   1032:                                                                        break;
                   1033:                                                                case 13:
                   1034:                                                                        uq^=UQ_NOEXASC;
                   1035:                                                                        break;
                   1036:                                                                case 14:
                   1037:                                                                        uq^=UQ_XEDIT;
                   1038:                                     break;
                   1039:                                                                case 15:
                   1040:                                                                        uq^=UQ_CMDSHELL;
                   1041:                                     break;
                   1042:                                                                case 16:
                   1043:                                                                        uq^=UQ_NODEF;
                   1044:                                     break;
                   1045:                                                                        } }
                   1046:                                                break; } }
                   1047:                        break;
                   1048:                case 10:        /* Advanced Options */
                   1049:                        done=0;
                   1050:                        while(!done) {
                   1051:                                i=0;
                   1052:                                sprintf(opt[i++],"%-27.27s%s","New User Magic Word",new_magic);
                   1053:                                sprintf(opt[i++],"%-27.27s%.40s","Data Directory",data_dir);
                   1054:                                sprintf(opt[i++],"%-27.27s%.40s","Executables Directory"
                   1055:                                        ,exec_dir);
                   1056:                                sprintf(opt[i++],"%-27.27s%s","Input SIF Questionnaire"
                   1057:                                        ,new_sif);
                   1058:                                sprintf(opt[i++],"%-27.27s%s","Output SIF Questionnaire"
                   1059:                                        ,new_sof);
                   1060:                                ultoac(cdt_per_dollar,str);
                   1061:                                sprintf(opt[i++],"%-27.27s%s","Credits Per Dollar",str);
                   1062:                                sprintf(opt[i++],"%-27.27s%u","Minutes Per 100k Credits"
                   1063:                                        ,cdt_min_value);
                   1064:                                sprintf(opt[i++],"%-27.27s%s","Maximum Number of Minutes"
                   1065:                                        ,max_minutes ? ltoa(max_minutes,tmp,10) : "Unlimited");
                   1066:                                sprintf(opt[i++],"%-27.27s%u","Warning Days Till Expire"
                   1067:                                        ,sys_exp_warn);
                   1068:                                sprintf(opt[i++],"%-27.27s%u","Default Status Line"
                   1069:                                        ,sys_def_stat);
                   1070:                                sprintf(opt[i++],"%-27.27s%u","Last Displayable Node"
                   1071:                                        ,sys_lastnode);
                   1072:                                sprintf(opt[i++],"%-27.27s%u","First Local Auto-Node"
                   1073:                                        ,sys_autonode);
                   1074:                                sprintf(opt[i++],"%-27.27s%s","Phone Number Format"
                   1075:                                        ,sys_phonefmt);
                   1076:                                sprintf(opt[i++],"%-27.27s%.40s","Sysop Chat Requirements"
                   1077:                                        ,sys_chat_ar);
                   1078:                                opt[i][0]=0;
                   1079:                                savnum=0;
                   1080:                                SETHELP(WHERE);
                   1081: /*
                   1082: &System Advanced Options:&
                   1083: 
                   1084: Care should be taken when modifying any of the options listed here.
                   1085: */
                   1086:                                switch(ulist(WIN_ACT|WIN_BOT|WIN_RHT,0,0,60,&adv_dflt,0
                   1087:                                        ,"Advanced Options",opt)) {
                   1088:                                        case -1:
                   1089:                                                done=1;
                   1090:                         break;
                   1091: 
                   1092:                                        case 0:
                   1093:                                                SETHELP(WHERE);
                   1094: /*
                   1095: &New User Magic Word:&
                   1096: 
                   1097: If this field has a value, it is assumed the sysop has placed some
                   1098: reference to this &magic word& in TEXT\NEWUSER.MSG and new users
                   1099: will be prompted for the magic word after they enter their password.
                   1100: If they do not enter it correctly, it is assumed they didn't read the
                   1101: new user information displayed to them and they are disconnected.
                   1102: 
                   1103: Think of it as a password to guarantee that new users read the text
                   1104: displayed to them.
                   1105: */
                   1106:                                                uinput(WIN_MID,0,0,"New User Magic Word",new_magic,20
                   1107:                                                        ,K_EDIT|K_UPPER);
                   1108:                                                break;
                   1109:                                        case 1:
                   1110:                                                SETHELP(WHERE);
                   1111: /*
                   1112: &Data Directory Parent:&
                   1113: 
                   1114: The Synchronet data directory contains almost all the data for your BBS.
                   1115: This directory must be located where &ALL& nodes can access it and
                   1116: &MUST NOT& be placed on a RAM disk or other volatile media.
                   1117: 
                   1118: This option allows you to change the parent of your data directory.
                   1119: The &\DATA\& suffix (sub-directory) cannot be changed or removed.
                   1120: */
                   1121:                                                strcpy(str,data_dir);
                   1122:                                                if(strstr(str,"\\DATA\\")!=NULL)
                   1123:                                                        *strstr(str,"\\DATA\\")=0;
                   1124:                                                if(uinput(WIN_MID|WIN_SAV,0,9,"Data Dir Parent"
                   1125:                                                        ,str,50,K_EDIT|K_UPPER)>0) {
                   1126:                                                        if(str[strlen(str)-1]!='\\')
                   1127:                                                                strcat(str,"\\");
                   1128:                                                        strcat(str,"DATA\\");
                   1129:                                                        strcpy(data_dir,str); }
                   1130:                         break;
                   1131:                                        case 2:
                   1132:                                                SETHELP(WHERE);
                   1133: /*
                   1134: &Exec Directory Parent:&
                   1135: 
                   1136: The Synchronet exec directory contains executable files that your BBS
                   1137: executes. This directory does ¬& need to be in your DOS search path.
                   1138: If you place programs in this directory for the BBS to execute, you
                   1139: should place the &%!& abreviation for this exec directory at the
                   1140: beginning of the command line.
                   1141: 
                   1142: This option allows you to change the parent of your exec directory.
                   1143: The &\EXEC\& suffix (sub-directory) cannot be changed or removed.
                   1144: */
                   1145:                                                strcpy(str,exec_dir);
                   1146:                                                if(strstr(str,"\\EXEC\\")!=NULL)
                   1147:                                                        *strstr(str,"\\EXEC\\")=0;
                   1148:                                                if(uinput(WIN_MID|WIN_SAV,0,9,"Exec Dir Parent"
                   1149:                                                        ,str,50,K_EDIT|K_UPPER)>0) {
                   1150:                                                        if(str[strlen(str)-1]!='\\')
                   1151:                                                                strcat(str,"\\");
                   1152:                                                        strcat(str,"EXEC\\");
                   1153:                                                        strcpy(exec_dir,str); }
                   1154:                         break;
                   1155:                                        case 3:
                   1156:                                                strcpy(str,new_sif);
                   1157:                                                SETHELP(WHERE);
                   1158: /*
                   1159: &SIF Questionnaire for User Input:&
                   1160: 
                   1161: This is the name of a SIF questionnaire file that resides your text
                   1162: directory that all users will be prompted to answer.
                   1163: */
                   1164:                                                uinput(WIN_MID|WIN_SAV,0,0
                   1165:                                                        ,"SIF Questionnaire for User Input"
                   1166:                                                        ,str,8,K_UPPER|K_EDIT);
                   1167:                                                if(!str[0] || code_ok(str))
                   1168:                                                        strcpy(new_sif,str);
                   1169:                                                else
                   1170:                                                        umsg("Invalid SIF Name");
                   1171:                                                break;
                   1172:                                        case 4:
                   1173:                                                strcpy(str,new_sof);
                   1174:                                                SETHELP(WHERE);
                   1175: /*
                   1176: &SIF Questionnaire for Reviewing User Input:&
                   1177: 
                   1178: This is the SIF file used to review the input of users from the user
                   1179: edit function.
                   1180: */
                   1181:                                                uinput(WIN_MID|WIN_SAV,0,0
                   1182:                                                        ,"SIF Questionnaire for Reviewing User Input"
                   1183:                                                        ,str,8,K_UPPER|K_EDIT);
                   1184:                                                if(!str[0] || code_ok(str))
                   1185:                                                        strcpy(new_sof,str);
                   1186:                                                else
                   1187:                                                        umsg("Invalid SIF Name");
                   1188:                                                break;
                   1189:                                        case 5:
                   1190:                                                SETHELP(WHERE);
                   1191: /*
                   1192: &Credits Per Dollar:&
                   1193: 
                   1194: This is the monetary value of a credit (How many credits per dollar).
                   1195: This value should be a power of 2 (1, 2, 4, 8, 16, 32, 64, 128, etc.)
                   1196: since credits are usually converted by 100 kilobyte (102400) blocks.
                   1197: To make a dollar worth two megabytes of credits, set this value to
                   1198: 2,097,152 (a megabyte is 1024*1024 or 1048576).
                   1199: */
                   1200:                                                ultoa(cdt_per_dollar,str,10);
                   1201:                                                uinput(WIN_MID|WIN_SAV,0,0
                   1202:                                                        ,"Credits Per Dollar",str,10,K_NUMBER|K_EDIT);
                   1203:                                                cdt_per_dollar=atol(str);
                   1204:                                                break;
                   1205:                                        case 6:
                   1206:                                                SETHELP(WHERE);
                   1207: /*
                   1208: &Minutes Per 100K Credits:&
                   1209: 
                   1210: This is the value of a minute of time online. This field is the number
                   1211: of minutes to give the user in exchange for each 100K credit block.
                   1212: */
                   1213:                                                sprintf(str,"%u",cdt_min_value);
                   1214:                                                uinput(WIN_MID|WIN_SAV,0,0
                   1215:                                                        ,"Minutes Per 100K Credits",str,5,K_NUMBER|K_EDIT);
                   1216:                                                cdt_min_value=atoi(str);
                   1217:                                                break;
                   1218:                                        case 7:
                   1219:                                                SETHELP(WHERE);
                   1220: /*
                   1221: &Maximum Number of Minutes User Can Have:&
                   1222: 
                   1223: This value is the maximum total number of minutes a user can have. If a
                   1224: user has this number of minutes or more, they will not be allowed to
                   1225: convert credits into minutes. A sysop can add minutes to a user's
                   1226: account regardless of this maximum. If this value is set to &0&, users
                   1227: will have no limit on the total number of minutes they can have.
                   1228: */
                   1229:                                                sprintf(str,"%lu",max_minutes);
                   1230:                                                uinput(WIN_MID|WIN_SAV,0,0
                   1231:                                                        ,"Maximum Number of Minutes a User Can Have "
                   1232:                                                        "(0=No Limit)"
                   1233:                                                        ,str,10,K_NUMBER|K_EDIT);
                   1234:                                                max_minutes=atol(str);
                   1235:                                                break;
                   1236:                                        case 8:
                   1237:                                                SETHELP(WHERE);
                   1238: /*
                   1239: &Warning Days Till Expire:&
                   1240: 
                   1241: If a user's account will expire in this many days or less, the user will
                   1242: be notified at logon. Setting this value to &0& disables the warning
                   1243: completely.
                   1244: */
                   1245:                                                sprintf(str,"%u",sys_exp_warn);
                   1246:                                                uinput(WIN_MID|WIN_SAV,0,0
                   1247:                                                        ,"Warning Days Till Expire",str,5,K_NUMBER|K_EDIT);
                   1248:                                                sys_exp_warn=atoi(str);
                   1249:                         break;
                   1250:                                        case 9:
                   1251:                                                SETHELP(WHERE);
                   1252: /*
                   1253: &Default Status Line:&
                   1254: 
                   1255: This is the number of the status line format that will be the default
                   1256: display on the bottom line of the screen. For explanation of the
                   1257: available status lines, see the sysop documentation.
                   1258: */
                   1259:                                                sprintf(str,"%u",sys_def_stat);
                   1260:                                                uinput(WIN_MID|WIN_SAV,0,0
                   1261:                                                        ,"Default Status Line",str,5,K_NUMBER|K_EDIT);
                   1262:                                                sys_def_stat=atoi(str);
                   1263:                                                break;
                   1264:                                        case 10:
                   1265:                                                SETHELP(WHERE);
                   1266: /*
                   1267: &Last Displayed Node:&
                   1268: 
                   1269: This is the number of the last node to display to users in node lists.
                   1270: This allows the sysop to define the higher numbered nodes as &invisible&
                   1271: to users.
                   1272: */
                   1273:                                                sprintf(str,"%u",sys_lastnode);
                   1274:                                                uinput(WIN_MID|WIN_SAV,0,0
                   1275:                                                        ,"Last Displayed Node",str,5,K_NUMBER|K_EDIT);
                   1276:                                                sys_lastnode=atoi(str);
                   1277:                         break;
                   1278:                                        case 11:
                   1279:                                                SETHELP(WHERE);
                   1280: /*
                   1281: &First Local Auto-Node:&
                   1282: 
                   1283: This is the number of the first node in the search for an available
                   1284: node for local login using the &AUTONODE& utility.
                   1285: */
                   1286:                                                sprintf(str,"%u",sys_autonode);
                   1287:                                                uinput(WIN_MID|WIN_SAV,0,0
                   1288:                                                        ,"First Local Auto-Node",str,5,K_NUMBER|K_EDIT);
                   1289:                                                sys_autonode=atoi(str);
                   1290:                         break;
                   1291:                                        case 12:
                   1292:                                                SETHELP(WHERE);
                   1293: /*
                   1294: &Phone Number Format:&
                   1295: 
                   1296: This is the format used for phone numbers in your local calling
                   1297: area. Use &N& for number positions, &A& for alphabetic, or &!& for any
                   1298: character. All other characters will be static in the phone number
                   1299: format. An example for North American phone numbers is &NNN-NNN-NNNN&.
                   1300: */
                   1301:                                                uinput(WIN_MID|WIN_SAV,0,0
                   1302:                                                        ,"Phone Number Format",sys_phonefmt
                   1303:                                                        ,LEN_PHONE,K_UPPER|K_EDIT);
                   1304:                         break;
                   1305:                                        case 13:
                   1306:                                                getar("Sysop Chat",sys_chat_ar);
                   1307:                                                break;
                   1308:                                                } }
                   1309:                                break;
                   1310:                case 11: /* Loadable Modules */
                   1311:                        done=0;
                   1312:                        k=0;
                   1313:                        while(!done) {
                   1314:                                i=0;
                   1315:                                sprintf(opt[i++],"%-16.16s%s","Login",login_mod);
                   1316:                                sprintf(opt[i++],"%-16.16s%s","Logon Event",logon_mod);
                   1317:                                sprintf(opt[i++],"%-16.16s%s","Sync Event",sync_mod);
                   1318:                                sprintf(opt[i++],"%-16.16s%s","Logoff Event",logoff_mod);
                   1319:                                sprintf(opt[i++],"%-16.16s%s","Logout Event",logout_mod);
                   1320:                                sprintf(opt[i++],"%-16.16s%s","New User Event",newuser_mod);
                   1321:                                sprintf(opt[i++],"%-16.16s%s","Expired User",expire_mod);
                   1322:                                opt[i][0]=0;
                   1323:                                savnum=0;
                   1324:                                SETHELP(WHERE);
                   1325: /*
                   1326: &Loadable Modules:&
                   1327: 
                   1328: Baja modules (.BIN files) can be automatically loaded and executed
                   1329: during certain system functions. The name of the module can be specified
                   1330: for each of the available triggers listed here.
                   1331: 
                   1332: &Login&                Required module for remote and local logins (online)
                   1333: &Logon&                Executed as an event during logon procedure (online)
                   1334: &Sync&                 Executed when nodes are periodically synchronized (online)
                   1335: &Logoff&               Executed during logoff procedure (online)
                   1336: &Logout&               Executed during logout procedure (offline)
                   1337: &New User&             Executed at end of new user procedure (online)
                   1338: &Expired User& Executed during daily event when user expires (offline)
                   1339: */
                   1340:                                switch(ulist(WIN_ACT|WIN_T2B|WIN_RHT,0,0,32,&k,0
                   1341:                                        ,"Loadable Modules",opt)) {
                   1342: 
                   1343:                                        case -1:
                   1344:                                                done=1;
                   1345:                         break;
                   1346: 
                   1347:                                        case 0:
                   1348:                                                uinput(WIN_MID|WIN_SAV,0,0,"Login Module",login_mod,8
                   1349:                                                        ,K_EDIT|K_UPPER);
                   1350:                         break;
                   1351:                                        case 1:
                   1352:                                                uinput(WIN_MID|WIN_SAV,0,0,"Logon Module",logon_mod,8
                   1353:                                                        ,K_EDIT|K_UPPER);
                   1354:                         break;
                   1355:                                        case 2:
                   1356:                                                uinput(WIN_MID|WIN_SAV,0,0,"Synchronize Module"
                   1357:                                                        ,sync_mod,8,K_EDIT|K_UPPER);
                   1358:                         break;
                   1359:                                        case 3:
                   1360:                                                uinput(WIN_MID|WIN_SAV,0,0,"Logoff Module",logoff_mod,8
                   1361:                                                        ,K_EDIT|K_UPPER);
                   1362:                         break;
                   1363:                                        case 4:
                   1364:                                                uinput(WIN_MID|WIN_SAV,0,0,"Logout Module",logout_mod,8
                   1365:                                                        ,K_EDIT|K_UPPER);
                   1366:                         break;
                   1367:                                        case 5:
                   1368:                                                uinput(WIN_MID|WIN_SAV,0,0,"New User Module"
                   1369:                                                        ,newuser_mod,8,K_EDIT|K_UPPER);
                   1370:                         break;
                   1371:                                        case 6:
                   1372:                                                uinput(WIN_MID|WIN_SAV,0,0,"Expired User Module"
                   1373:                                                        ,expire_mod,8,K_EDIT|K_UPPER);
                   1374:                         break;
                   1375: 
                   1376:                                        } }
                   1377:                        break;
                   1378: 
                   1379:                case 12: /* Security Levels */
                   1380:                        dflt=bar=0;
                   1381:                        k=0;
                   1382:                        while(1) {
                   1383:                                for(i=0;i<100;i++) {
                   1384:                                        sprintf(tmp,"%luk",level_freecdtperday[i]/1024L);
                   1385:                                        sprintf(opt[i],"%-2d    %5d %5d "
                   1386:                                                "%5d %5d %5d %5d %6s %7s %2u",i
                   1387:                                                ,level_timeperday[i],level_timepercall[i]
                   1388:                                                ,level_callsperday[i],level_emailperday[i]
                   1389:                                                ,level_postsperday[i],level_linespermsg[i]
                   1390:                                                ,tmp
                   1391:                                                ,level_misc[i]&LEVEL_EXPTOVAL ? "Val Set" : "Level"
                   1392:                                                ,level_misc[i]&(LEVEL_EXPTOVAL|LEVEL_EXPTOLVL) ?
                   1393:                                                        level_expireto[i] : expired_level); }
                   1394:                                opt[i][0]=0;
                   1395:                                i=0;
                   1396:                                SETHELP(WHERE);
                   1397: /*
                   1398: &Security Level Values:&
                   1399: 
                   1400: This menu allows you to change the security options for every possible
                   1401: security level from 0 to 99. The available options for each level are:
                   1402: 
                   1403:        Time Per Day             :      Maximum online time per day
                   1404:        Time Per Call            :      Maximum online time per call
                   1405:        Calls Per Day            :      Maximum number of calls per day
                   1406:        Email Per Day            :      Maximum number of email per day
                   1407:        Posts Per Day            :      Maximum number of posts per day
                   1408:        Lines Per Message        :      Maximum number of lines per message
                   1409:        Free Credits Per Day :  Number of free credits per day
                   1410:        Expire To                        :      Level or validation set to Expire to
                   1411: */
                   1412:                                i=ulist(WIN_RHT|WIN_ACT,0,3,0,&dflt,&bar
                   1413:                                        ,"Level   T/D   T/C   C/D   E/D   P/D   L/M   F/D   "
                   1414:                                                "Expire To",opt);
                   1415:                                if(i==-1)
                   1416:                                        break;
                   1417:                                while(1) {
                   1418:                                        sprintf(str,"Security Level %d Values",i);
                   1419:                                        j=0;
                   1420:                                        sprintf(opt[j++],"%-22.22s%-5u","Time Per Day"
                   1421:                                                ,level_timeperday[i]);
                   1422:                                        sprintf(opt[j++],"%-22.22s%-5u","Time Per Call"
                   1423:                                                ,level_timepercall[i]);
                   1424:                                        sprintf(opt[j++],"%-22.22s%-5u","Calls Per Day"
                   1425:                                                ,level_callsperday[i]);
                   1426:                                        sprintf(opt[j++],"%-22.22s%-5u","Email Per Day"
                   1427:                                                ,level_emailperday[i]);
                   1428:                                        sprintf(opt[j++],"%-22.22s%-5u","Posts Per Day"
                   1429:                         ,level_postsperday[i]);
                   1430:                                        sprintf(opt[j++],"%-22.22s%-5u","Lines Per Message"
                   1431:                                                ,level_linespermsg[i]);
                   1432:                                        sprintf(tmp,"%luk",level_freecdtperday[i]/1024L);
                   1433:                                        sprintf(opt[j++],"%-22.22s%-6s","Free Credits Per Day"
                   1434:                                                ,tmp);
                   1435:                                        sprintf(opt[j++],"%-22.22s%s %u","Expire To"
                   1436:                                                ,level_misc[i]&LEVEL_EXPTOVAL ? "Validation Set"
                   1437:                                                        : "Level"
                   1438:                                                ,level_misc[i]&(LEVEL_EXPTOVAL|LEVEL_EXPTOLVL) ?
                   1439:                                                        level_expireto[i] : expired_level);
                   1440:                                        opt[j][0]=0;
                   1441:                                        savnum=0;
                   1442:                                        j=ulist(WIN_RHT|WIN_SAV|WIN_ACT,2,1,0,&k,0
                   1443:                                                ,str,opt);
                   1444:                                        if(j==-1)
                   1445:                                                break;
                   1446:                                        switch(j) {
                   1447:                                                case 0:
                   1448:                                                        uinput(WIN_MID|WIN_SAV,0,0
                   1449:                                                                ,"Total Time Allowed Per Day"
                   1450:                                                                ,itoa(level_timeperday[i],tmp,10),3
                   1451:                                                                ,K_NUMBER|K_EDIT);
                   1452:                                                        level_timeperday[i]=atoi(tmp);
                   1453:                                                        if(level_timeperday[i]>500)
                   1454:                                                                level_timeperday[i]=500;
                   1455:                                                        break;
                   1456:                                                case 1:
                   1457:                                                        uinput(WIN_MID|WIN_SAV,0,0
                   1458:                                                                ,"Time Allowed Per Call"
                   1459:                                                                ,itoa(level_timepercall[i],tmp,10),3
                   1460:                                                                ,K_NUMBER|K_EDIT);
                   1461:                                                        level_timepercall[i]=atoi(tmp);
                   1462:                                                        if(level_timepercall[i]>500)
                   1463:                                                                level_timepercall[i]=500;
                   1464:                             break;
                   1465:                                                case 2:
                   1466:                                                        uinput(WIN_MID|WIN_SAV,0,0
                   1467:                                                                ,"Calls Allowed Per Day"
                   1468:                                                                ,itoa(level_callsperday[i],tmp,10),4
                   1469:                                                                ,K_NUMBER|K_EDIT);
                   1470:                                                        level_callsperday[i]=atoi(tmp);
                   1471:                             break;
                   1472:                                                case 3:
                   1473:                             uinput(WIN_MID|WIN_SAV,0,0
                   1474:                                 ,"Email Allowed Per Day"
                   1475:                                                                ,itoa(level_emailperday[i],tmp,10),4
                   1476:                                 ,K_NUMBER|K_EDIT);
                   1477:                             level_emailperday[i]=atoi(tmp);
                   1478:                             break;
                   1479:                                                case 4:
                   1480:                                                        uinput(WIN_MID|WIN_SAV,0,0
                   1481:                                                                ,"Posts Allowed Per Day"
                   1482:                                                                ,itoa(level_postsperday[i],tmp,10),4
                   1483:                                                                ,K_NUMBER|K_EDIT);
                   1484:                                                        level_postsperday[i]=atoi(tmp);
                   1485:                             break;
                   1486:                                                case 5:
                   1487:                                                        uinput(WIN_MID|WIN_SAV,0,0
                   1488:                                                                ,"Lines Allowed Per Message (Post/E-mail)"
                   1489:                                                                ,itoa(level_linespermsg[i],tmp,10),4
                   1490:                                                                ,K_NUMBER|K_EDIT);
                   1491:                                                        level_linespermsg[i]=atoi(tmp);
                   1492:                                                        break;
                   1493:                                                case 6:
                   1494:                                                        uinput(WIN_MID|WIN_SAV,0,0
                   1495:                                                                ,"Free Credits Per Day (in Kilobytes)"
                   1496:                                                                ,ultoa(level_freecdtperday[i]/1024L,tmp,10),8
                   1497:                                                                ,K_EDIT|K_UPPER);
                   1498:                                                        level_freecdtperday[i]=atol(tmp)*1024L;
                   1499:                                                        break;
                   1500:                                                case 7:
                   1501:                                                        j=0;
                   1502:                                                        sprintf(opt[j++],"Default Expired Level "
                   1503:                                                                "(Currently %u)",expired_level);
                   1504:                                                        sprintf(opt[j++],"Specific Level");
                   1505:                                                        sprintf(opt[j++],"Quick-Validation Set");
                   1506:                                                        opt[j][0]=0;
                   1507:                                                        j=0;
                   1508:                                                        sprintf(str,"Level %u Expires To",i);
                   1509:                                                        savnum=1;
                   1510:                                                        j=ulist(WIN_SAV,2,1,0,&j,0
                   1511:                                                                ,str,opt);
                   1512:                                                        if(j==-1)
                   1513:                                                                break;
                   1514:                                                        if(j==0) {
                   1515:                                                                level_misc[i]&=
                   1516:                                                                        ~(LEVEL_EXPTOLVL|LEVEL_EXPTOVAL);
                   1517:                                                                changes=1;
                   1518:                                                                break; }
                   1519:                                                        if(j==1) {
                   1520:                                                                level_misc[i]&=~LEVEL_EXPTOVAL;
                   1521:                                                                level_misc[i]|=LEVEL_EXPTOLVL;
                   1522:                                                                changes=1;
                   1523:                                                                uinput(WIN_MID|WIN_SAV,0,0
                   1524:                                                                        ,"Expired Level"
                   1525:                                                                        ,itoa(level_expireto[i],tmp,10),2
                   1526:                                                                        ,K_EDIT|K_NUMBER);
                   1527:                                                                level_expireto[i]=atoi(tmp);
                   1528:                                                                break; }
                   1529:                                                        level_misc[i]&=~LEVEL_EXPTOLVL;
                   1530:                                                        level_misc[i]|=LEVEL_EXPTOVAL;
                   1531:                                                        uinput(WIN_MID|WIN_SAV,0,0
                   1532:                                                                ,"Quick-Validation Set to Expire To"
                   1533:                                                                ,itoa(level_expireto[i],tmp,10),1
                   1534:                                                                ,K_EDIT|K_NUMBER);
                   1535:                                                        level_expireto[i]=atoi(tmp);
                   1536:                                                        break;
                   1537:                                                        } } }
                   1538:                        break;
                   1539:                case 13:        /* Expired Acccount Values */
                   1540:                        dflt=0;
                   1541:                        done=0;
                   1542:                        while(!done) {
                   1543:                                i=0;
                   1544:                                sprintf(opt[i++],"%-27.27s%u","Level",expired_level);
                   1545:                                sprintf(opt[i++],"%-27.27s%s","Flag Set #1 to Remove"
                   1546:                                        ,ltoaf(expired_flags1,str));
                   1547:                                sprintf(opt[i++],"%-27.27s%s","Flag Set #2 to Remove"
                   1548:                                        ,ltoaf(expired_flags2,str));
                   1549:                                sprintf(opt[i++],"%-27.27s%s","Flag Set #3 to Remove"
                   1550:                                        ,ltoaf(expired_flags3,str));
                   1551:                                sprintf(opt[i++],"%-27.27s%s","Flag Set #4 to Remove"
                   1552:                                        ,ltoaf(expired_flags4,str));
                   1553:                                sprintf(opt[i++],"%-27.27s%s","Exemptions to Remove"
                   1554:                                        ,ltoaf(expired_exempt,str));
                   1555:                                sprintf(opt[i++],"%-27.27s%s","Restrictions to Add"
                   1556:                                        ,ltoaf(expired_rest,str));
                   1557:                                opt[i][0]=0;
                   1558:                                SETHELP(WHERE);
                   1559: /*
                   1560: &Expired Account Values:&
                   1561: 
                   1562: If a user's account expires, the security levels for that account will
                   1563: be modified according to the settings of this menu. The &Main Level& and
                   1564: &Transfer Level& will be set to the values listed on this menu. The &Main
                   1565: Flags&, &Transfer Flags&, and &Exemptions& listed on this menu will be
                   1566: removed from the account if they are set. The &Restrictions& listed will
                   1567: be added to the account.
                   1568: */
                   1569:                                switch(ulist(WIN_ACT|WIN_BOT|WIN_RHT,0,0,60,&dflt,0
                   1570:                                        ,"Expired Account Values",opt)) {
                   1571:                                        case -1:
                   1572:                                                done=1;
                   1573:                                                break;
                   1574:                                        case 0:
                   1575:                                                itoa(expired_level,str,10);
                   1576:                                                SETHELP(WHERE);
                   1577: /*
                   1578: &Expired Account Security Level:&
                   1579: 
                   1580: This is the security level automatically given to expired user accounts.
                   1581: */
                   1582:                                                uinput(WIN_SAV|WIN_MID,0,0,"Security Level"
                   1583:                                                        ,str,2,K_EDIT|K_NUMBER);
                   1584:                                                expired_level=atoi(str);
                   1585:                                                break;
                   1586:                                        case 1:
                   1587:                                                ltoaf(expired_flags1,str);
                   1588:                                                SETHELP(WHERE);
                   1589: /*
                   1590: &Expired Security Flags to Remove:&
                   1591: 
                   1592: These are the security flags automatically removed when a user account
                   1593: has expired.
                   1594: */
                   1595:                                                uinput(WIN_SAV|WIN_MID,0,0,"Flags Set #1"
                   1596:                                                        ,str,26,K_EDIT|K_UPPER|K_ALPHA);
                   1597:                                                expired_flags1=aftol(str);
                   1598:                                                break;
                   1599:                                        case 2:
                   1600:                                                ltoaf(expired_flags2,str);
                   1601:                                                SETHELP(WHERE);
                   1602: /*
                   1603: &Expired Security Flags to Remove:&
                   1604: 
                   1605: These are the security flags automatically removed when a user account
                   1606: has expired.
                   1607: */
                   1608:                                                uinput(WIN_SAV|WIN_MID,0,0,"Flags Set #2"
                   1609:                                                        ,str,26,K_EDIT|K_UPPER|K_ALPHA);
                   1610:                                                expired_flags2=aftol(str);
                   1611:                         break;
                   1612:                                        case 3:
                   1613:                                                ltoaf(expired_flags3,str);
                   1614:                                                SETHELP(WHERE);
                   1615: /*
                   1616: &Expired Security Flags to Remove:&
                   1617: 
                   1618: These are the security flags automatically removed when a user account
                   1619: has expired.
                   1620: */
                   1621:                                                uinput(WIN_SAV|WIN_MID,0,0,"Flags Set #3"
                   1622:                                                        ,str,26,K_EDIT|K_UPPER|K_ALPHA);
                   1623:                                                expired_flags3=aftol(str);
                   1624:                         break;
                   1625:                                        case 4:
                   1626:                                                ltoaf(expired_flags4,str);
                   1627:                                                SETHELP(WHERE);
                   1628: /*
                   1629: &Expired Security Flags to Remove:&
                   1630: 
                   1631: These are the security flags automatically removed when a user account
                   1632: has expired.
                   1633: */
                   1634:                                                uinput(WIN_SAV|WIN_MID,0,0,"Flags Set #4"
                   1635:                                                        ,str,26,K_EDIT|K_UPPER|K_ALPHA);
                   1636:                                                expired_flags4=aftol(str);
                   1637:                         break;
                   1638:                                        case 5:
                   1639:                                                ltoaf(expired_exempt,str);
                   1640:                                                SETHELP(WHERE);
                   1641: /*
                   1642: &Expired Exemption Flags to Remove:&
                   1643: 
                   1644: These are the exemptions that are automatically removed from a user
                   1645: account if it expires.
                   1646: */
                   1647:                                                uinput(WIN_SAV|WIN_MID,0,0,"Exemption Flags",str,26
                   1648:                                                        ,K_EDIT|K_UPPER|K_ALPHA);
                   1649:                                                expired_exempt=aftol(str);
                   1650:                                                break;
                   1651:                                        case 6:
                   1652:                                                ltoaf(expired_rest,str);
                   1653:                                                SETHELP(WHERE);
                   1654: /*
                   1655: &Expired Restriction Flags to Add:&
                   1656: 
                   1657: These are the restrictions that are automatically added to a user
                   1658: account if it expires.
                   1659: */
                   1660:                                                uinput(WIN_SAV|WIN_MID,0,0,"Restriction Flags",str,26
                   1661:                                                        ,K_EDIT|K_UPPER|K_ALPHA);
                   1662:                                                expired_rest=aftol(str);
                   1663:                                                break; } }
                   1664:                        break;
                   1665:                case 14:        /* Quick-Validation Values */
                   1666:                        dflt=0;
                   1667:                        k=0;
                   1668:                        while(1) {
                   1669:                                for(i=0;i<10;i++)
                   1670:                                        sprintf(opt[i],"%d  SL: %-2d  F1: %s"
                   1671:                                                ,i,val_level[i],ltoaf(val_flags1[i],str));
                   1672:                                opt[i][0]=0;
                   1673:                                i=0;
                   1674:                                SETHELP(WHERE);
                   1675: /*
                   1676: &Quick-Validation Values:&
                   1677: 
                   1678: This is a list of the ten quick-validation sets. These sets are used to
                   1679: quickly set a user's security values (Level, Flags, Exemptions,
                   1680: Restrictions, Expiration Date, and Credits) with one key stroke. The
                   1681: user's expiration date may be extended and additional credits may also
                   1682: be added using quick-validation sets.
                   1683: 
                   1684: Holding down  ALT  and one of the number keys (&1-9&) while a user
                   1685: is online, automatically sets his or user security values to the
                   1686: quick-validation set for that number key.
                   1687: 
                   1688: From within the &User Edit& function, a sysop can use the &V&alidate
                   1689: User command and select from this quick-validation list to change a
                   1690: user's security values with very few key-strokes.
                   1691: */
                   1692:                                savnum=0;
                   1693:                                i=ulist(WIN_RHT|WIN_BOT|WIN_ACT|WIN_SAV,0,0,0,&dflt,0
                   1694:                                        ,"Quick-Validation Values",opt);
                   1695:                                if(i==-1)
                   1696:                     break;
                   1697:                                sprintf(str,"Quick-Validation Set %d",i);
                   1698:                                savnum=0;
                   1699:                                while(1) {
                   1700:                                        j=0;
                   1701:                                        sprintf(opt[j++],"%-22.22s%u","Level",val_level[i]);
                   1702:                                        sprintf(opt[j++],"%-22.22s%s","Flag Set #1"
                   1703:                                                ,ltoaf(val_flags1[i],tmp));
                   1704:                                        sprintf(opt[j++],"%-22.22s%s","Flag Set #2"
                   1705:                                                ,ltoaf(val_flags2[i],tmp));
                   1706:                                        sprintf(opt[j++],"%-22.22s%s","Flag Set #3"
                   1707:                                                ,ltoaf(val_flags3[i],tmp));
                   1708:                                        sprintf(opt[j++],"%-22.22s%s","Flag Set #4"
                   1709:                                                ,ltoaf(val_flags4[i],tmp));
                   1710:                                        sprintf(opt[j++],"%-22.22s%s","Exemptions"
                   1711:                                                ,ltoaf(val_exempt[i],tmp));
                   1712:                                        sprintf(opt[j++],"%-22.22s%s","Restrictions"
                   1713:                                                ,ltoaf(val_rest[i],tmp));
                   1714:                                        sprintf(opt[j++],"%-22.22s%u days","Extend Expiration"
                   1715:                                                ,val_expire[i]);
                   1716:                                        sprintf(opt[j++],"%-22.22s%lu","Additional Credits"
                   1717:                                                ,val_cdt[i]);
                   1718:                                        opt[j][0]=0;
                   1719:                                        savnum=1;
                   1720:                                        j=ulist(WIN_RHT|WIN_SAV|WIN_ACT,2,1,0,&k,0
                   1721:                                                ,str,opt);
                   1722:                                        if(j==-1)
                   1723:                                                break;
                   1724:                                        switch(j) {
                   1725:                                                case 0:
                   1726:                                                        uinput(WIN_MID|WIN_SAV,0,0
                   1727:                                                                ,"Level"
                   1728:                                                                ,itoa(val_level[i],tmp,10),2
                   1729:                                                                ,K_NUMBER|K_EDIT);
                   1730:                                                        val_level[i]=atoi(tmp);
                   1731:                                                        break;
                   1732:                                                case 1:
                   1733:                                                        uinput(WIN_MID|WIN_SAV,0,0
                   1734:                                                                ,"Flag Set #1"
                   1735:                                                                ,ltoaf(val_flags1[i],tmp),26
                   1736:                                                                ,K_UPPER|K_ALPHA|K_EDIT);
                   1737:                                                        val_flags1[i]=aftol(tmp);
                   1738:                             break;
                   1739:                                                case 2:
                   1740:                                                        uinput(WIN_MID|WIN_SAV,0,0
                   1741:                                                                ,"Flag Set #2"
                   1742:                                                                ,ltoaf(val_flags2[i],tmp),26
                   1743:                                                                ,K_UPPER|K_ALPHA|K_EDIT);
                   1744:                                                        val_flags2[i]=aftol(tmp);
                   1745:                             break;
                   1746:                                                case 3:
                   1747:                                                        uinput(WIN_MID|WIN_SAV,0,0
                   1748:                                                                ,"Flag Set #3"
                   1749:                                                                ,ltoaf(val_flags3[i],tmp),26
                   1750:                                                                ,K_UPPER|K_ALPHA|K_EDIT);
                   1751:                                                        val_flags3[i]=aftol(tmp);
                   1752:                             break;
                   1753:                                                case 4:
                   1754:                                                        uinput(WIN_MID|WIN_SAV,0,0
                   1755:                                                                ,"Flag Set #4"
                   1756:                                                                ,ltoaf(val_flags4[i],tmp),26
                   1757:                                                                ,K_UPPER|K_ALPHA|K_EDIT);
                   1758:                                                        val_flags4[i]=aftol(tmp);
                   1759:                             break;
                   1760:                                                case 5:
                   1761:                                                        uinput(WIN_MID|WIN_SAV,0,0
                   1762:                                                                ,"Exemption Flags"
                   1763:                                                                ,ltoaf(val_exempt[i],tmp),26
                   1764:                                                                ,K_UPPER|K_ALPHA|K_EDIT);
                   1765:                                                        val_exempt[i]=aftol(tmp);
                   1766:                             break;
                   1767:                                                case 6:
                   1768:                                                        uinput(WIN_MID|WIN_SAV,0,0
                   1769:                                                                ,"Restriction Flags"
                   1770:                                                                ,ltoaf(val_rest[i],tmp),26
                   1771:                                                                ,K_UPPER|K_ALPHA|K_EDIT);
                   1772:                                                        val_rest[i]=aftol(tmp);
                   1773:                                                        break;
                   1774:                                                case 7:
                   1775:                                                        uinput(WIN_MID|WIN_SAV,0,0
                   1776:                                                                ,"Days to Extend Expiration"
                   1777:                                                                ,itoa(val_expire[i],tmp,10),4
                   1778:                                                                ,K_NUMBER|K_EDIT);
                   1779:                                                        val_expire[i]=atoi(tmp);
                   1780:                             break;
                   1781:                                                case 8:
                   1782:                                                        uinput(WIN_MID|WIN_SAV,0,0
                   1783:                                                                ,"Additional Credits"
                   1784:                                                                ,ultoa(val_cdt[i],tmp,10),10
                   1785:                                                                ,K_NUMBER|K_EDIT);
                   1786:                                                        val_cdt[i]=atol(tmp);
                   1787:                                                        break; } } }
                   1788:                        break; } }
                   1789: 
                   1790: }

unix.superglobalmegacorp.com

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