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