Skip to content
Snippets Groups Projects
Commit d3270f8d authored by echicken's avatar echicken
Browse files

Comments, don't crap out on a command error.

parent b8d1300d
No related branches found
No related tags found
Loading
/* Menu Shell - uses menus created via 'menuedit.js'
Create your menus by running the following in your exec directory:
jsexec menuedit.js
Install the shell by first compiling the Baja launcher stub:
baja menushel.src
Then add the command shell to your configuration:
scfg
Command Shells
(Add a new entry)
Command Shell Name: Menu Shell
Command Shell Internal Code: MENUSHEL
This is not an example command shell. See classic_shell.js or lbshell.js
for examples of how to write your own shell, and consult Synchronet's JS
Object model documentation (http://synchro.net/docs/jsobjs.html) for help.
*/
load("sbbsdefs.js"); load("sbbsdefs.js");
load("menu-commands.js"); load("menu-commands.js");
...@@ -47,11 +70,15 @@ var doMenu = function() { ...@@ -47,11 +70,15 @@ var doMenu = function() {
if(typeof command.menu != "undefined") { if(typeof command.menu != "undefined") {
menu = command.menu; menu = command.menu;
} else { } else {
var path = command.command.split("."); try { // Let's not lose the entire session because of a bad command.
if(path[1] == "Externals") var path = command.command.split(".");
bbs.exec_xtrn(path[2]); if(path[1] == "Externals")
else bbs.exec_xtrn(path[2]);
Commands[path[1]][path[2]].Action(); else
Commands[path[1]][path[2]].Action();
} catch(err) {
log(LOG_ERR, err);
}
} }
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment