diff --git a/src/sbbs3/scfg/scfg.c b/src/sbbs3/scfg/scfg.c index 14d399f591bb9c1024a7570b70b408da2246f2dd..5864c02269b4a1db5ca49e90e633e878e77b1865 100644 --- a/src/sbbs3/scfg/scfg.c +++ b/src/sbbs3/scfg/scfg.c @@ -153,17 +153,17 @@ void sort_dirs(int libnum) qsort(cfg.dir, cfg.total_dirs, sizeof(dir_t*), dir_compare); } -void wizard_msg(const char* text) +void wizard_msg(int page, int total, const char* text) { uifc.showbuf(WIN_HLP|WIN_DYN|WIN_L2R, 2, 2, 78, 20, "Setup Wizard", text, NULL, NULL); -} - -static bool abort_wizard(void) -{ - char* opt[] = { "Abort", "Restart", NULL }; - wizard_msg("You can abort the Setup Wizard now or restart from the beginning."); - return uifc.list(WIN_SAV | WIN_L2R | WIN_NOBRDR, 0, 10 ,0, NULL, NULL - ,"Abort Setup Wizard", opt) == 0; + if(page > 0 && page < total) { + int x = (uifc.scrn_width / 2) + 22; + int y = 21; + uifc.printf(x, y, uifc.bclr<<4, "%*.*s", total, total + , "\xb0\xb0\xb0\xb0\xb0\xb0\xb0\xb0\xb0\xb0\xb0\xb0\xb0\xb0\xb0\xb0\xb0\xb0"); + uifc.printf(x, y, uifc.lclr|(uifc.bclr<<4), "%*.*s", page, page + , "\xb0\xb0\xb0\xb0\xb0\xb0\xb0\xb0\xb0\xb0\xb0\xb0\xb0\xb0\xb0\xb0\xb0\xb0"); + } } void cfg_wizard(void) @@ -181,91 +181,174 @@ void cfg_wizard(void) return; } + int stage = 0; + int total = 16; scfg_t saved_cfg = cfg; do { - char* opt[] = { "Continue", NULL }; + switch(stage) { + case -1: + char* opt[] = { "Abort", "Continue", NULL }; + wizard_msg(stage, total, "Do you wish to abort the Setup Wizard now?"); + if(uifc.list(WIN_SAV | WIN_L2R | WIN_NOBRDR, 0, 10 ,0, NULL, NULL + ,"Abort Setup Wizard", opt) == 0) + stage = 100; + break; + case __COUNTER__: + { + char* opt[] = { "Continue", NULL }; - wizard_msg( - " ~ Welcome ~\n" - "\n" - "This wizard will take you through the configuration of the basic\n" - "parameters required to run a Synchronet Bulletin Board System. All of\n" - "these configuration parameters may be changed later if you choose.\n" - "\n" - "Press ~ ENTER ~ to advance through the setup wizard or ~ ESC ~ to abort\n" - "or restart the wizard." - ); - if(uifc.list(WIN_SAV | WIN_L2R | WIN_NOBRDR, 0, 12 ,0, NULL, NULL, NULL, opt) == -1) - continue; - if(edit_sys_name(true) < 1) - continue; - if(edit_sys_operator(true) < 1) - continue; - if(edit_sys_password(true) < 1) - continue; - if(edit_sys_inetaddr(true) < 1) - continue; - if(edit_sys_id(true) < 0) - continue; - if(edit_sys_location(true) < 1) - continue; - if(edit_sys_timezone(true) < 0) - continue; - if(edit_sys_timefmt(true) < 0) - continue; - if(edit_sys_datefmt(true) < 0) - continue; - if(edit_sys_newuser_policy(true) < 0) - continue; - if(!(cfg.sys_misc & SM_CLOSED)) { - if(edit_sys_newuser_fback_policy(true) < 0) - continue; - if(edit_sys_alias_policy(true) < 0) - continue; - } - if(edit_sys_delmsg_policy(true) < 0) - continue; - if(memcmp(&saved_cfg, &cfg, sizeof(cfg)) == 0) { - uifc.scrn(title); - uifc.msg("No configuration changes made"); - continue; - } - wizard_msg("`System Password Verification`\n\n" - "At this point you must re-enter the system password that you set earlier\n" - "in the configuration wizard.\n" - "\n" - "This same password will be required of you when you logon to the BBS with\n" - "any user account that has System Operator (sysop) privileges\n" - "(i.e. security level 90 or higher).\n" - ); - char pass[sizeof(cfg.sys_pass)]; - do { - if(uifc.input(WIN_L2R|WIN_SAV, 0, 14, "SY", pass, sizeof(cfg.sys_pass)-1, K_PASSWORD | K_UPPER) < 0) + wizard_msg(stage, total, + " ~ Welcome ~\n" + "\n" + "This wizard will take you through the configuration of the basic\n" + "parameters required to run a Synchronet Bulletin Board System. All of\n" + "these configuration parameters may be changed later if you choose.\n" + "\n" + "Press ~ ENTER ~ to advance through the setup wizard or ~ ESC ~ to move\n" + "backward or abort the wizard." + ); + if(uifc.list(WIN_SAV | WIN_L2R | WIN_NOBRDR, 0, 12 ,0, NULL, NULL, NULL, opt) == -1) { + --stage; + continue; + } break; - } while(strcmp(cfg.sys_pass, pass) != 0); - if(strcmp(cfg.sys_pass, pass)) - continue; - wizard_msg( - " ~ Initial Setup Complete! ~\n" - "\n" - "You have completed the initial configuration of the basic parameters\n" - "required to run Synchronet - the ultimate choice in BBS software for the\n" - "Internet Age.\n" - "\n" - "Thank you for choosing Synchronet,\n" - "\n" - "Rob Swindell (digital man)\n" - ); - char* save_opts[] = { "Save Changes", "Discard Changes", NULL }; - if(uifc.list(WIN_SAV | WIN_L2R | WIN_NOBRDR, 0, 14 ,0, NULL, NULL, NULL, save_opts) != 0) - continue; - if(strcmp(saved_cfg.sys_pass, cfg.sys_pass) != 0) - reencrypt_keys(saved_cfg.sys_pass, cfg.sys_pass); - cfg.new_install = new_install; - save_main_cfg(&cfg, backup_level); - save_msgs_cfg(&cfg, backup_level); - break; - } while(!abort_wizard()); + } + case __COUNTER__: + if(edit_sys_name(stage, total) < 1) { + --stage; + continue; + } + break; + case __COUNTER__: + if(edit_sys_operator(stage, total) < 1) { + --stage; + continue; + } + break; + case __COUNTER__: + if(edit_sys_password(stage, total) < 1) { + --stage; + continue; + } + break; + case __COUNTER__: + if(edit_sys_inetaddr(stage, total) < 1) { + --stage; + continue; + } + break; + case __COUNTER__: + if(edit_sys_id(stage, total) < 0) { + --stage; + continue; + } + break; + case __COUNTER__: + if(edit_sys_location(stage, total) < 1) { + --stage; + continue; + } + break; + case __COUNTER__: + if(edit_sys_timezone(stage, total) < 0) { + --stage; + continue; + } + break; + case __COUNTER__: + if(edit_sys_timefmt(stage, total) < 0) { + --stage; + continue; + } + break; + case __COUNTER__: + if(edit_sys_datefmt(stage, total) < 0) { + --stage; + continue; + } + break; + case __COUNTER__: + if(edit_sys_newuser_policy(stage, total) < 0) { + --stage; + continue; + } + break; + case __COUNTER__: + if(!(cfg.sys_misc & SM_CLOSED)) { + if(edit_sys_newuser_fback_policy(stage, total) < 0) { + --stage; + continue; + } + } + break; + case __COUNTER__: + if(!(cfg.sys_misc & SM_CLOSED)) { + if(edit_sys_alias_policy(stage, total) < 0) { + --stage; + continue; + } + } + break; + case __COUNTER__: + if(edit_sys_delmsg_policy(stage, total) < 0) { + --stage; + continue; + } + break; + case __COUNTER__: + if(memcmp(&saved_cfg, &cfg, sizeof(cfg)) == 0) { + uifc.scrn(title); + uifc.msg("No configuration changes made"); + stage = -1; + continue; + } + break; + case __COUNTER__: + wizard_msg(stage, total, + "`System Password Verification`\n\n" + "At this point you must re-enter the system password that you set earlier\n" + "in the configuration wizard.\n" + "\n" + "This same password will be required of you when you logon to the BBS with\n" + "any user account that has System Operator (sysop) privileges\n" + "(i.e. security level 90 or higher).\n" + ); + char pass[sizeof(cfg.sys_pass)]; + do { + if(uifc.input(WIN_L2R|WIN_SAV, 0, 14, "SY", pass, sizeof(cfg.sys_pass)-1, K_PASSWORD | K_UPPER) < 0) + break; + } while(strcmp(cfg.sys_pass, pass) != 0); + if(strcmp(cfg.sys_pass, pass)) { + stage = -1; + continue; + } + break; + case __COUNTER__: + wizard_msg(stage, total, + " ~ Initial Setup Complete! ~\n" + "\n" + "You have completed the initial configuration of the basic parameters\n" + "required to run Synchronet - the ultimate choice in BBS software for the\n" + "Internet Age.\n" + "\n" + "Thank you for choosing Synchronet,\n" + "\n" + " digital man (rob)\n" + ); + char* save_opts[] = { "Save Changes", "Discard Changes", NULL }; + if(uifc.list(WIN_SAV | WIN_L2R | WIN_NOBRDR, 0, 14 ,0, NULL, NULL, NULL, save_opts) != 0) { + stage = -1; + continue; + } + if(strcmp(saved_cfg.sys_pass, cfg.sys_pass) != 0) + reencrypt_keys(saved_cfg.sys_pass, cfg.sys_pass); + cfg.new_install = new_install; + save_main_cfg(&cfg, backup_level); + save_msgs_cfg(&cfg, backup_level); + break; + } + ++stage; + } while(stage < __COUNTER__); free_main_cfg(&cfg); free_msgs_cfg(&cfg); diff --git a/src/sbbs3/scfg/scfg.h b/src/sbbs3/scfg/scfg.h index e5d3070dcaa77c4d49405bc58bdc0897f6d8e1b5..b75b8bc2d94dc8a3efcdb4637bc4c1f6fe04a334 100644 --- a/src/sbbs3/scfg/scfg.h +++ b/src/sbbs3/scfg/scfg.h @@ -147,20 +147,20 @@ void guru_cfg(void); void actsets_cfg(void); void chan_cfg(void); void mdm_cfg(int mdmnum); -void wizard_msg(const char* text); -int edit_sys_name(bool wiz); -int edit_sys_id(bool wiz); -int edit_sys_location(bool wiz); -int edit_sys_operator(bool wiz); -int edit_sys_password(bool wiz); -int edit_sys_inetaddr(bool wiz); -int edit_sys_timezone(bool wiz); -int edit_sys_timefmt(bool wiz); -int edit_sys_datefmt(bool wiz); -int edit_sys_newuser_policy(bool wiz); -int edit_sys_alias_policy(bool wiz); -int edit_sys_delmsg_policy(bool wiz); -int edit_sys_newuser_fback_policy(bool wiz); +void wizard_msg(int page, int total, const char* text); +int edit_sys_name(int page, int total); +int edit_sys_id(int page, int total); +int edit_sys_location(int page, int total); +int edit_sys_operator(int page, int total); +int edit_sys_password(int page, int total); +int edit_sys_inetaddr(int page, int total); +int edit_sys_timezone(int page, int total); +int edit_sys_timefmt(int page, int total); +int edit_sys_datefmt(int page, int total); +int edit_sys_newuser_policy(int page, int total); +int edit_sys_alias_policy(int page, int total); +int edit_sys_delmsg_policy(int page, int total); +int edit_sys_newuser_fback_policy(int page, int total); void reencrypt_keys(const char* old_pass, const char* new_pass); int export_mdm(char *fname); int code_ok(char *str); diff --git a/src/sbbs3/scfg/scfgmsg.c b/src/sbbs3/scfg/scfgmsg.c index e18df80c94c783ec60f1903729c02e3f884ff5bf..eb76a55cd2ff5706eaec40451492beec83d83c13 100644 --- a/src/sbbs3/scfg/scfgmsg.c +++ b/src/sbbs3/scfg/scfgmsg.c @@ -1180,7 +1180,7 @@ void msg_opts() } return; case 0: - edit_sys_id(false); + edit_sys_id(false, false); break; case 1: uifc.helpbuf= @@ -1451,7 +1451,7 @@ void msg_opts() } break; case 16: - edit_sys_delmsg_policy(false); + edit_sys_delmsg_policy(false, false); break; case 17: uifc.helpbuf= diff --git a/src/sbbs3/scfg/scfgnet.c b/src/sbbs3/scfg/scfgnet.c index 01ef2436fcf39fd5dee02f0bbf1dfcbda9609dbe..9b2afab797e1bb8e0bb939ee9b8b0533d6bcb75e 100644 --- a/src/sbbs3/scfg/scfgnet.c +++ b/src/sbbs3/scfg/scfgnet.c @@ -923,7 +923,7 @@ void net_cfg() done=1; break; case 0: - edit_sys_inetaddr(false); + edit_sys_inetaddr(false, false); break; case 1: uifc.helpbuf= diff --git a/src/sbbs3/scfg/scfgsys.c b/src/sbbs3/scfg/scfgsys.c index 5ba14a89e1447018e97008acc26bac7d72cafdba..f5cdbb592879287bb8e50d594237809843a72f94 100644 --- a/src/sbbs3/scfg/scfgsys.c +++ b/src/sbbs3/scfg/scfgsys.c @@ -21,14 +21,14 @@ #include "ssl.h" #include "ciolib.h" // CIO_KEY_* -static int wiz_help(const char* buf) +static int wiz_help(int page, int total, const char* buf) { - wizard_msg(buf); + wizard_msg(page, total, buf); uifc.helpbuf = NULL; return WIN_SAV | WIN_L2R | WIN_NOBRDR; } -int edit_sys_name(bool wiz) +int edit_sys_name(int page, int total) { int mode = WIN_SAV | WIN_MID; uifc.helpbuf= @@ -38,12 +38,12 @@ int edit_sys_name(bool wiz) "If you want to see BBS names already in use, reference Internet indexes\n" "such as `http://synchro.net/sbbslist.html` and `http://telnetbbsguide.com`" ; - if(wiz) - mode = wiz_help(uifc.helpbuf); + if(page) + mode = wiz_help(page, total, uifc.helpbuf); return uifc.input(mode,0,10,"BBS Name",cfg.sys_name,sizeof(cfg.sys_name)-1,K_EDIT); } -int edit_sys_location(bool wiz) +int edit_sys_location(int page, int total) { int mode = WIN_SAV | WIN_MID; uifc.helpbuf= @@ -52,12 +52,12 @@ int edit_sys_location(bool wiz) "This is the location of the BBS. The format is flexible, but it is\n" "suggested you use the `City, State` format for U.S. locations.\n" ; - if(wiz) - mode = wiz_help(uifc.helpbuf); + if(page) + mode = wiz_help(page, total, uifc.helpbuf); return uifc.input(mode,0,10,"System Location",cfg.sys_location,sizeof(cfg.sys_location)-1,K_EDIT); } -int edit_sys_operator(bool wiz) +int edit_sys_operator(int page, int total) { int mode = WIN_SAV | WIN_MID; uifc.helpbuf= @@ -67,12 +67,12 @@ int edit_sys_operator(bool wiz) "have to be the same name or alias as user #1. This value is used for\n" "informational/display purposes only.\n" ; - if(wiz) - mode = wiz_help(uifc.helpbuf); + if(page) + mode = wiz_help(page, total, uifc.helpbuf); return uifc.input(mode,0,10,"System Operator Name",cfg.sys_op,sizeof(cfg.sys_op)-1,K_EDIT); } -int edit_sys_password(bool wiz) +int edit_sys_password(int page, int total) { int mode = WIN_SAV | WIN_MID; uifc.helpbuf= @@ -88,12 +88,12 @@ int edit_sys_password(bool wiz) "password with the system password, separated by a colon\n" "(i.e. '`user-pass:system-pass`').\n" ; - if(wiz) - mode = wiz_help(uifc.helpbuf); + if(page) + mode = wiz_help(page, total, uifc.helpbuf); return uifc.input(mode,0,16,"System Password",cfg.sys_pass,sizeof(cfg.sys_pass)-1,K_EDIT|K_UPPER); } -int edit_sys_inetaddr(bool wiz) +int edit_sys_inetaddr(int page, int total) { int mode = WIN_SAV | WIN_MID; uifc.helpbuf= @@ -102,13 +102,13 @@ int edit_sys_inetaddr(bool wiz) "Enter your system's Internet address (hostname or IP address) here\n" "(e.g. `joesbbs.com`).\n" ; - if(wiz) - mode = wiz_help(uifc.helpbuf); + if(page) + mode = wiz_help(page, total, uifc.helpbuf); return uifc.input(mode,0,10,"System Internet Address" ,cfg.sys_inetaddr,32,K_EDIT); } -int edit_sys_id(bool wiz) +int edit_sys_id(int page, int total) { int mode = WIN_SAV | WIN_MID; char str[LEN_QWKID + 1]; @@ -127,8 +127,8 @@ int edit_sys_id(bool wiz) "filename characters. In a QWK packet network, each system must have\n" "a unique QWK system ID.\n" ; - if(wiz) - mode = wiz_help(uifc.helpbuf); + if(page) + mode = wiz_help(page, total, uifc.helpbuf); if(uifc.input(mode,0,16,"BBS ID for QWK Packets" ,str,LEN_QWKID,K_EDIT|K_UPPER) < 1) break; @@ -141,7 +141,7 @@ int edit_sys_id(bool wiz) return -1; } -static int configure_dst(bool wiz) +static int configure_dst(int page, int total) { int mode = WIN_SAV | WIN_MID; strcpy(opt[0],"Yes"); @@ -162,8 +162,8 @@ static int configure_dst(bool wiz) "instead of \"PST\" and calculate the correct offset from UTC), it does not\n" "actually change the time on your computer system(s) for you.\n" ; - if(wiz) - mode = wiz_help(uifc.helpbuf); + if(page) + mode = wiz_help(page, total, uifc.helpbuf); i=uifc.list(mode,0,14,0,&i,0 ,"Daylight Saving Time (DST)",opt); if(i==-1) @@ -184,7 +184,7 @@ static int configure_dst(bool wiz) return i; } -int edit_sys_timezone(bool wiz) +int edit_sys_timezone(int page, int total) { int mode = WIN_SAV | WIN_MID; char str[128]; @@ -197,8 +197,8 @@ int edit_sys_timezone(bool wiz) "\n" "If your local time zone is the United States, select `Yes`.\n" ; - if(wiz) - mode = wiz_help(uifc.helpbuf); + if(page) + mode = wiz_help(page, total, uifc.helpbuf); i=uifc.list(mode,0,10,0,&i,0 ,"United States Time Zone",uifcYesNoOpts); if(i==-1) @@ -229,8 +229,8 @@ int edit_sys_timezone(bool wiz) "\n" "Choose the region which most closely reflects your local U.S. time zone.\n" ; - if(wiz) - mode = wiz_help(uifc.helpbuf); + if(page) + mode = wiz_help(page, total, uifc.helpbuf); i=uifc.list(mode,0,9,0,&i,0 ,"U.S. Time Zone",opt); if(i==-1) @@ -261,7 +261,7 @@ int edit_sys_timezone(bool wiz) cfg.sys_timezone=BST; break; } - return configure_dst(wiz); + return configure_dst(page, total); } i=0; strcpy(opt[i++],"Midway"); @@ -329,8 +329,8 @@ int edit_sys_timezone(bool wiz) "Choose `Other...` if a region representing your local time zone is not\n" "listed (you will be able to set the exact UTC offset manually)." ; - if(wiz) { - mode = wiz_help(uifc.helpbuf); + if(page) { + mode = wiz_help(page, total, uifc.helpbuf); mode |= WIN_FIXEDHEIGHT; } bar = i; @@ -430,8 +430,8 @@ int edit_sys_timezone(bool wiz) "Enter your local time zone offset from Universal Time (UTC/GMT) in `HH:MM`\n" "format.\n" ; - if(wiz) - mode = wiz_help(uifc.helpbuf); + if(page) + mode = wiz_help(page, total, uifc.helpbuf); if(uifc.input(mode,0,10 ,"Time (HH:MM) East (+) or West (-) of Universal Time" ,str,6,K_EDIT|K_UPPER) < 1) @@ -447,11 +447,11 @@ int edit_sys_timezone(bool wiz) return 0; } if(SMB_TZ_HAS_DST(cfg.sys_timezone)) - return configure_dst(wiz); + return configure_dst(page, total); return 1; } -int edit_sys_newuser_policy(bool wiz) +int edit_sys_newuser_policy(int page, int total) { int mode = WIN_SAV | WIN_MID; int i=cfg.sys_misc&SM_CLOSED ? 1:0; @@ -462,8 +462,8 @@ int edit_sys_newuser_policy(bool wiz) "(e.g. create a new user account by logging-in as `New`), set this option\n" "to `Yes`.\n" ; - if(wiz) - mode = wiz_help(uifc.helpbuf); + if(page) + mode = wiz_help(page, total, uifc.helpbuf); i=uifc.list(mode,0,10,0,&i,0 ,"Open to New Users",uifcYesNoOpts); if(i == 0) { @@ -475,8 +475,8 @@ int edit_sys_newuser_policy(bool wiz) "password, enter that password here. If you prefer that `any` caller be\n" "able to register a new user account, leave this option blank.\n" ; - if(wiz) - mode = wiz_help(uifc.helpbuf); + if(page) + mode = wiz_help(page, total, uifc.helpbuf); if(uifc.input(mode,0,10,"New User Password (optional)",cfg.new_pass,sizeof(cfg.new_pass)-1 ,K_EDIT|K_UPPER) < 0) return -1; @@ -487,7 +487,7 @@ int edit_sys_newuser_policy(bool wiz) return i; } -int edit_sys_delmsg_policy(bool wiz) +int edit_sys_delmsg_policy(int page, int total) { int mode = WIN_SAV | WIN_MID; char* opt[] = {"Yes", "No", "Sysops Only", NULL }; @@ -518,8 +518,8 @@ int edit_sys_delmsg_policy(bool wiz) "If this option is set to `Sysops Only`, then only sysops and sub-ops (when\n" "appropriate) can view deleted messages.\n" ; - if(wiz) - mode = wiz_help(uifc.helpbuf); + if(page) + mode = wiz_help(page, total, uifc.helpbuf); i=uifc.list(mode,0,15,0,&i,0 ,"Users Can View Deleted Messages",opt); if(!i && (cfg.sys_misc&(SM_USRVDELM|SM_SYSVDELM)) @@ -617,7 +617,7 @@ void security_cfg(void) case -1: return; case __COUNTER__: - edit_sys_password(false); + edit_sys_password(false, false); break; case __COUNTER__: if(!(cfg.sys_misc&SM_R_SYSOP)) @@ -844,7 +844,7 @@ void security_cfg(void) cfg.sys_autodel=atoi(str); break; case __COUNTER__: - edit_sys_newuser_policy(false); + edit_sys_newuser_policy(false, false); break; case __COUNTER__: i=cfg.sys_misc&SM_TIME_EXP ? 0:1; @@ -1289,7 +1289,7 @@ void security_cfg(void) } } -int edit_sys_timefmt(bool wiz) +int edit_sys_timefmt(int page, int total) { int mode = WIN_SAV | WIN_MID; int i = (cfg.sys_misc & SM_MILITARY) ? 1:0; @@ -1300,8 +1300,8 @@ int edit_sys_timefmt(bool wiz) "If you would like the time-of-day to be displayed and entered in 24 hour\n" "format always, set this option to `24 hour`.\n" ; - if(wiz) - mode = wiz_help(uifc.helpbuf); + if(page) + mode = wiz_help(page, total, uifc.helpbuf); i=uifc.list(mode,0,10,0,&i,0 ,"Time Display Format", opts); if(i == 0) @@ -1311,7 +1311,7 @@ int edit_sys_timefmt(bool wiz) return i; } -int edit_sys_datefmt(bool wiz) +int edit_sys_datefmt(int page, int total) { int mode = WIN_SAV | WIN_MID; int i = (cfg.sys_misc & SM_EURODATE) ? 1:0; @@ -1323,8 +1323,8 @@ int edit_sys_datefmt(bool wiz) "U.S. date format of month first, choose `MM/DD/YY`. If you prefer the\n" "Europaen traditional date format of day first, choose `DD/MM/YY`.\n" ; - if(wiz) - mode = wiz_help(uifc.helpbuf); + if(page) + mode = wiz_help(page, total, uifc.helpbuf); i=uifc.list(mode,0,10,0,&i,0 ,"Date Display Format", opts); if(i == 0) @@ -1334,7 +1334,7 @@ int edit_sys_datefmt(bool wiz) return i; } -int edit_sys_alias_policy(bool wiz) +int edit_sys_alias_policy(int page, int total) { int mode = WIN_SAV | WIN_MID; int i = (cfg.uq & UQ_ALIASES) ? 0:1; @@ -1345,8 +1345,8 @@ int edit_sys_alias_policy(bool wiz) "false name, handle, or alias, set this option to `Yes`. If you want all\n" "users on your system to be known only by their real names, select `No`.\n" ; - if(wiz) - mode = wiz_help(uifc.helpbuf); + if(page) + mode = wiz_help(page, total, uifc.helpbuf); i=uifc.list(mode,0,10,0,&i,0 ,"Allow Users to Use Aliases",uifcYesNoOpts); if(!i && !(cfg.uq&UQ_ALIASES)) { @@ -1358,7 +1358,7 @@ int edit_sys_alias_policy(bool wiz) return i; } -int edit_sys_newuser_fback_policy(bool wiz) +int edit_sys_newuser_fback_policy(int page, int total) { int mode = WIN_SAV | WIN_MID; char str[128]; @@ -1376,8 +1376,8 @@ int edit_sys_newuser_fback_policy(bool wiz) "This feature can be disabled by setting this value to `0`, allowing new\n" "users to register and logon without sending validation feedback.\n" ; - if(wiz) - mode = wiz_help(uifc.helpbuf); + if(page) + mode = wiz_help(page, total, uifc.helpbuf); int i = uifc.input(mode, 0, 16, "Require New User Feedback to (0=Nobody)" ,str, 5, K_NUMBER|K_EDIT); if(i >= 0) @@ -1460,7 +1460,7 @@ void cfg_notify(void) return; break; case 0: - edit_sys_newuser_fback_policy(false); + edit_sys_newuser_fback_policy(false, false); break; case 1: ultoa(cfg.erruser,str,10); @@ -1547,16 +1547,16 @@ void sys_cfg(void) } return; case 0: - edit_sys_name(false); + edit_sys_name(false, false); break; case 1: - edit_sys_location(false); + edit_sys_location(false, false); break; case 2: - edit_sys_timezone(false); + edit_sys_timezone(false, false); break; case 3: - edit_sys_operator(false); + edit_sys_operator(false, false); break; case 4: cfg_notify(); @@ -1598,7 +1598,7 @@ void sys_cfg(void) done=1; break; case 0: - edit_sys_alias_policy(false); + edit_sys_alias_policy(false, false); break; case 1: i=cfg.sys_misc&SM_TIMEBANK ? 0:1; @@ -1696,10 +1696,10 @@ void sys_cfg(void) } break; case 6: - edit_sys_timefmt(false); + edit_sys_timefmt(false, false); break; case 7: - edit_sys_datefmt(false); + edit_sys_datefmt(false, false); break; case 8: i=cfg.sys_misc&SM_NOSYSINFO ? 1:0;