• .JS as a Command Shell

    From art@VERT/FATCATS to All on Wed Nov 18 13:43:09 2009
    Hi guys,ããI must have missed something because I don't seem to see it in theãdocumentation or past messages: how would one go about setting a .JS file as aãcommand shell?ããDoes this involve making a BAJA "shell" just to call the .JS?ããThanks & regards,ãArt at fatcats dot poorcoding dot comãã| fatcats bbs |ã| + telnet://fatcats.poorcoding.com |ã| + ssh://fatcats.poorcoding.com:2322 |ãã---ã þ Synchronet þ fatcats bbs - http://fatcats.poorcoding.comã
  • From echicken@VERT/ECBBS to art on Wed Nov 18 10:58:11 2009
    Re: .JS as a Command Shellã By: art to All on Wed Nov 18 2009 13:43:09ãã > documentation or past messages: how would one go about setting a .JS file asã > command shell?ã > Does this involve making a BAJA "shell" just to call the .JS?ããYes, that's how you do it.ããAdd your command shell via SCFG, assign it a name and an internal code, thenãcreate a Baja stub that will call your JS. Name the Baja file after yourãshell's internal code (if you used the internal code "SHELL" then your Bajaãfile should be "SHELL.SRC".) Your Baja stub need only contain one line to callãthe JS shell, so if your shell JS is shell.js, your Baja would be 'execã"?shell"'.ããecãã---ã þ Synchronet þ electronic chicken bbs - bbs.electronicchicken.comã
  • From esc@VERT/MONTEREY to art on Wed Nov 18 20:45:51 2009
    Re: .JS as a Command Shellã By: art to All on Wed Nov 18 2009 01:43 pmãã > Hi guys,ãã > I must have missed something because I don't seem to see it in theã > documentation or past messages: how would one go about setting a .JS file asã > command shell?ããI have it on my board set up that way...however, my custom command shell is theãonly one to be used. .JS files handle everything from login to the menus toãlaunching doors to logoff...there are no .bin files used. I just don't giveãthe board the chance to use a .bin file, I handle everything from the get-go inã.js. To take a look check out montereybbs.com.ããesc(montereybbs/demonic/mimic)ãã---ã þ Synchronet þ :: montereybbs.com ::ã
  • From Nightfox@VERT/DIGDIST to art on Wed Nov 18 20:24:45 2009
    Re: .JS as a Command Shellã By: art to All on Wed Nov 18 2009 13:43:09ãã > > I must have missed something because I don't seem to see it in theã > > documentation or past messages: how would one go about setting a .JS fileã > > command shell?ã > > ã > > Does this involve making a BAJA "shell" just to call the .JS?ããYep, that's the only way you can do it.. Create a Baja script that just callsãyour .js script and set up the Baja script as a command shell in SCFG.ããNightfoxãã---ã þ Synchronet þ Digital Distortion BBS: digdist.bbsindex.comã
  • From art@VERT/FATCATS to esc on Thu Nov 19 08:34:06 2009
    Re: .JS as a Command Shellã By: esc to art on Wed Nov 18 2009 20:45:51ãã > I have it on my board set up that way...however, my custom command shell is ã > only one to be used. .JS files handle everything from login to the menus toã > launching doors to logoff...there are no .bin files used. I just don't giveã > the board the chance to use a .bin file, I handle everything from the get-goããThanks E. Chicken, that's sage advice and I was considering porting my entireãlogin.src to .js to that effect... glad to know I was kind of on the rightãtrack...ãã> .js. To take a look check out montereybbs.com.ããI will take a look-see when I get a chance!ããKind regs,ãArt at fatcats dot poorcoding dot comãã| fatcats bbs |ã| + telnet://fatcats.poorcoding.com |ã| + ssh://fatcats.poorcoding.com:2322 |ãã---ã þ Synchronet þ fatcats bbs - http://fatcats.poorcoding.comã
  • From Tracker1@VERT/TRN to Nightfox on Thu Nov 19 13:39:46 2009
    On 11/17/2009 7:50 PM, Nightfox wrote:ã> > > I must have missed something because I don't seem to see it in theã> > > documentation or past messages: how would one go about setting a .JS fileã> > > command shell?ã> > > ã> > > Does this involve making a BAJA "shell" just to call the .JS?ã> ã> Yep, that's the only way you can do it.. Create a Baja script that just callsã> your .js script and set up the Baja script as a command shell in SCFG.ããIn S3, I have the baja in a loop with a pause prompt after exit, because you ãneed to exit out of the JS if you want to support changing shells.ãã-- ãMichael J. Ryan - http://tracker1.info/ãã... FRA #103: Sleep can interfere with profit. <i>(DS9 season 2, episode 7 - ã"Rules of Acquisition")</i>ãã---ã þ Synchronet þ Roughneck BBS - telnet://roughneckbbs.com - www.roughneckbbs.comã
  • From Nightfox@VERT/DIGDIST to Tracker1 on Thu Nov 19 14:14:21 2009
    Re: Re: .JS as a Command Shellã By: Tracker1 to Nightfox on Thu Nov 19 2009 13:39:46ãã > > In S3, I have the baja in a loop with a pause prompt after exit, because ã > > need to exit out of the JS if you want to support changing shells.ããThere's an alternate way to handle that, as recommended by Digital Man. Inãyour .js shell, you can check for whether the user changed their shell and exitãif so, as follows:ããuser.cached = false;ãvar oldShell = user.command_shell;ãbbs.user_config();ãuser.cached = false;ãbbs.user_sync();ãif (user.command_shell != oldShell)ã exit(0);ããThat's how I'm doing it in my .js shell, and the only thing I do in my Baja isãsimply run my .js script, and it is able to support changing shells.ããNightfoxãã---ã þ Synchronet þ Digital Distortion BBS: digdist.bbsindex.comã
  • From Tracker1@VERT/TRN to Nightfox on Sat Nov 21 11:19:14 2009
    On 11/19/2009 3:14 PM, Nightfox wrote:ã>> In S3, I have the baja in a loop with a pause prompt after exit, because ã>> need to exit out of the JS if you want to support changing shells.ã> ã> There's an alternate way to handle that, as recommended by Digital Man. Inã> your .js shell, you can check for whether the user changed their shell and exitã> if so, as follows:ã> ã> user.cached = false;ã> var oldShell = user.command_shell;ã> bbs.user_config();ã> user.cached = false;ã> bbs.user_sync();ã> if (user.command_shell != oldShell)ã> exit(0);ããCool, I have something similar to jump out, without a cold exit.ãã> That's how I'm doing it in my .js shell, and the only thing I do in my Baja isã> simply run my .js script, and it is able to support changing shells.ããwell, mine has the added ability to CTRL-C out of the script, and make ãchanges, hit enter and in the updated version. ;) This was really helpful ãwhen I was actively working on it.ãã-- ãMichael J. Ryan - http://tracker1.info/ãã---ã þ Synchronet þ Roughneck BBS - telnet://roughneckbbs.com - www.roughneckbbs.comã