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