• .js command shells

    From Glucose Grin@VERT to All on Sun Aug 8 23:31:22 2004
    Hey kids.ãã I'm trying to write a login matrix command shell in java, but I'm ãrunning into some stupid problems (ie. I'm stupid :) )ã javascript is new to me (I program in pascal) so I've fudged a loop to ãkeep the command input going (while (1) {}).ã However, I need to be able to test for the user disconnecting so I ãdon't pooch my bbs.ãã What is going on is this - I display my base ansi, then have an input ãloop where the cursor keys change the current menu command. Since the ãcommands don't do anything yet, I have to disconnect my client when I'm done ãtesting. Problem is, when my client disconnects, cpu usage spikes and I ãcan't shutdown the node or sbbsctrl.ãã I'm guessing my crappy script is just looping in the background, ãunaware that there is no longer a client attached. How do I fix that?ãã THanks!ããGlucose Grinãã---ã þ Synchronet þ Vertrauen þ Home of Synchronet þ [vert/cvs/bbs].synchro.netã
  • From Digital Man@VERT to Glucose Grin on Mon Aug 9 00:28:16 2004
    Re: .js command shellsã By: Glucose Grin to All on Sun Aug 08 2004 11:31 pmãã > I'm trying to write a login matrix command shell in java, but I'mã > running into some stupid problems (ie. I'm stupid :) )ã > javascript is new to me (I program in pascal) so I've fudged a loop tã > keep the command input going (while (1) {}).ã > However, I need to be able to test for the user disconnecting so Iã > don't pooch my bbs.ã > ã > What is going on is this - I display my base ansi, then have an inputã > loop where the cursor keys change the current menu command. Since theã > commands don't do anything yet, I have to disconnect my client when I'm doneã > testing. Problem is, when my client disconnects, cpu usage spikes and Iã > can't shutdown the node or sbbsctrl.ã > ã > I'm guessing my crappy script is just looping in the background,ã > unaware that there is no longer a client attached. How do I fix that?ããChange your loop to:ãã while(bbs.online) {ã }ãã digital manããSnapple "Real Fact" #110:ãFrogs never drink.ã---ã þ Synchronet þ Vertrauen þ Home of Synchronet þ [vert/cvs/bbs].synchro.netã
  • From Glucose Grin@VERT to Digital Man on Mon Aug 9 00:38:47 2004
    ã > while(bbs.online) { }ããI figgured it out now :) thank you. I did try that earlier, but I had ãwhile(bbs.online = 2), which I guess is assignment and not boolean, so I ãscrew'd up. Or maybe I just did it wrong.ãã It seems to be working now... and I have to say, THis javascript is ãmuch easier and more powerful than baja (altho as a BBS scripting language, ãbaja is pretty good)ãã Ahhweeeellll.. Thanks again.ããGlucose Grinãã---ã þ Synchronet þ Vertrauen þ Home of Synchronet þ [vert/cvs/bbs].synchro.netã
  • From Digital Man@VERT to Glucose Grin on Mon Aug 9 00:54:24 2004
    Re: .js command shellsã By: Glucose Grin to Digital Man on Mon Aug 09 2004 12:38 amãã > > while(bbs.online) { }ã > ã > I figgured it out now :) thank you. I did try that earlier, but I hadã > while(bbs.online = 2), which I guess is assignment and not boolean, so Iã > screw'd up. Or maybe I just did it wrong.ããYes, a single equals is assignment, not testing.ãã > It seems to be working now... and I have to say, THis javascript isã > much easier and more powerful than baja (altho as a BBS scripting language,ã > baja is pretty good)ã > ã > Ahhweeeellll.. Thanks again.ããNo problem.ãã digital manããSnapple "Real Fact" #138:ãHawaii is the only U.S. state that grows coffee. ã---ã þ Synchronet þ Vertrauen þ Home of Synchronet þ [vert/cvs/bbs].synchro.netã
  • From Tracker1@VERT/TRN to Glucose Grin on Tue Aug 10 01:52:00 2004
    Glucose Grin wrote:ã> I'm trying to write a login matrix command shell in java, but I'm ã> running into some stupid problems (ie. I'm stupid :) )ã> javascript is new to me (I program in pascal) so I've fudged a loop to ã> keep the command input going (while (1) {}).ã> However, I need to be able to test for the user disconnecting so I ã> don't pooch my bbs.ããvar done = false;ãwhile (bbs.online && !done) {ã ...ã}ãã> What is going on is this - I display my base ansi, then have an input ã> loop where the cursor keys change the current menu command. Since the ã> commands don't do anything yet, I have to disconnect my client when I'm ã> done testing. Problem is, when my client disconnects, cpu usage spikes ã> and I can't shutdown the node or sbbsctrl.ããSee above, and check out the assault base pack fromãhttp://www.vanguardmoddingcrew.com/ãã-- ãMichael J. Ryan - tracker1(at)theroughnecks(dot)net - www.theroughnecks.netãicq: 4935386 - AIM/AOL: azTracker1 - Y!: azTracker1 - MSN/Win: (email)ãã---ã þ Synchronet þ theroughnecks.net - you know you want itã