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
Branches
Tags
No related merge requests found
/* 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("menu-commands.js");
......@@ -47,11 +70,15 @@ var doMenu = function() {
if(typeof command.menu != "undefined") {
menu = command.menu;
} else {
var path = command.command.split(".");
if(path[1] == "Externals")
bbs.exec_xtrn(path[2]);
else
Commands[path[1]][path[2]].Action();
try { // Let's not lose the entire session because of a bad command.
var path = command.command.split(".");
if(path[1] == "Externals")
bbs.exec_xtrn(path[2]);
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