Annotation of sbbs/sbbs3/scfg/scfgsys.c, revision 1.1

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

unix.superglobalmegacorp.com

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