Subj : Working on new command shell in javascript
To   : All
From : nolageek
Date : Sun Mar 20 2016 01:51 am

Hey there!

I'm working on converting my command shell from Baja to JavaScript and I'm
running into a few bugs that I can't figure out. I'm running the command shell
to test it, so if I make any changes I have to switch to another command shell
and then back to the one I'm testing .. no problem, I've done that when I've
done my last few shells. HOWEVER, the problem I'm seeing is that when I switch
from my new shell to one of the others it the one I switch to appears in my
defaults and if I use 'console.putmsg(user.command_shell) it says my current
shell is the one I switched to but the BBS is still using my new one. The
commands are all the new shell.

In fact, my new shell uses user.command_shell in the paths to the menus and
it'll say c:\sbbs\text\menu\*oldshell*\main.asc is not found for some items...

I figure it has to be something about the way I'm calling the defaults menu...
Honestly I know just enought JavaScript to be dangerous. :) Here is my
'systemMenu' function....  any suggestions?


function systemMenu() {
   while (bbs.online) {
       bbs.node_action = 'NODE_DFLT';
       console.clear();
       bbs.menu(user.command_shell + '/system');
       console.putmsg(' \1h\1m ' + user.alias + '\1k@\1bSystem Menu\1w:\1n\1w
');

       var key = console.getkey(K_NOECHO).toUpperCase();
       bbs.log_key(key);
       switch (key) {
           //options and commands to perform
           case 'S':
               console.clear();
               bbs.sys_info();
               break;
           case 'U':
               console.clear();
               bbs.list_users();
               console.line_counter = 1;
               break;
           case 'W':
               bbs.menu(user.command_shell + '/nodeltop');
               break;
           case 'L':
               showLastCallers(10);
               break;
           case 'D':
               bbs.user_config();
               break;
               // for /D
           case '/':
               console.putmsg('/');
               slashMenu(console.getkey().toUpperCase());
               break;
           case ':':
               console.putmsg(':');
               colonMenu(console.getstr('', 4).toUpperCase());
               break;
           case 'Y':
               console.clear();
               bbs.user_info();
               break;
           case 'I':
               console.clear();
               bbs.ver();
               break;
           case 'M':
               console.clear();
               bbs.sub_info();
               break;
           case 'Q':
               mainMenu();
               return;
           default:
               return;
       } // end switch
   } // while online
   //hangUp();
} // end system



Any help would be much appreciated!

|01-|03nolageek

---
� Synchronet � Capitol Shrill BBS - Washington, DC - capitolshrill.com