Skip to content
Snippets Groups Projects
Commit b8415409 authored by Rob Swindell's avatar Rob Swindell :speech_balloon:
Browse files

Display warning dialog when changing cmdshell or xtrn editor's internal codes

Changing a command shell or an external editor's internal code will revert
the preference of any user's that have selected that shell or editor as their
default/preference. A sysop may not realize this, so warn them with lots of
detail in the help text if they need it. See issue #721 for details.

Also updated the help text for command shell internal codes since it still
only mentioned Baja/.bin modules.
parent 8032b14c
No related branches found
No related tags found
No related merge requests found
Pipeline #5863 failed
...@@ -1457,17 +1457,26 @@ void shell_cfg() ...@@ -1457,17 +1457,26 @@ void shell_cfg()
SAFECOPY(cfg.shell[i]->name,str); SAFECOPY(cfg.shell[i]->name,str);
break; break;
case 1: case 1:
uifc.helpbuf=
"`WARNING:`\n"
"\n"
"If you change a command shell's internal code, any users that have\n"
"chosen that shell as their default, will be reverted to the default\n"
"command shell for new users or the first configured command shell\n"
"for which they meet the access requirements.";
if(uifc.deny("Changing a shell's internal code is not recommended. Edit anyway?"))
break;
SAFECOPY(str,cfg.shell[i]->code); SAFECOPY(str,cfg.shell[i]->code);
uifc.helpbuf= uifc.helpbuf=
"`Command Shell Internal Code:`\n" "`Command Shell Internal Code:`\n"
"\n" "\n"
"Every command shell must have its own unique internal code for\n" "Every command shell must have its own unique internal code for\n"
"Synchronet to reference it by. It is helpful if this code is an\n" "Synchronet to reference it by.\n"
"abbreviation of the name.\n"
"\n" "\n"
"This code will be the base filename used to load the shell from your\n" "This code will be the base filename of the command shell script/module.\n"
"`exec` directory. e.g. A shell with an internal code of `MYBBS` would\n" "e.g. A shell with an internal code of `MYBBS` would correlate with a\n"
"indicate a Baja shell file named `mybbs.bin` in your `exec` directory.\n" "Baja shell file named `mybbs.bin` or a JavaScript module named `mybbs.js`\n"
"located in your `exec` or `mods` directories.\n"
; ;
uifc.input(WIN_MID|WIN_SAV,0,17,"Internal Code (unique)" uifc.input(WIN_MID|WIN_SAV,0,17,"Internal Code (unique)"
,str,LEN_CODE,K_EDIT|K_UPPER|K_NOSPACE); ,str,LEN_CODE,K_EDIT|K_UPPER|K_NOSPACE);
......
...@@ -1949,6 +1949,14 @@ void xedit_cfg() ...@@ -1949,6 +1949,14 @@ void xedit_cfg()
SAFECOPY(cfg.xedit[i]->name,str); SAFECOPY(cfg.xedit[i]->name,str);
break; break;
case 1: case 1:
uifc.helpbuf=
"`WARNING:`\n"
"\n"
"If you change an external editor's internal code, any users that have\n"
"chosen that editor as their default, will be reverted to the internal\n"
"message editor as their default preference (that they can then change).";
if(uifc.deny("Changing an editor's internal code is not recommended. Edit anyway?"))
break;
SAFECOPY(str,cfg.xedit[i]->code); SAFECOPY(str,cfg.xedit[i]->code);
uifc.helpbuf= uifc.helpbuf=
"`Message Editor Internal Code:`\n" "`Message Editor Internal Code:`\n"
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment