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?
while(bbs.online) { }
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.
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.
Sysop: | digital man |
---|---|
Location: | Riverside County, California |
Users: | 1,067 |
Nodes: | 17 (1 / 16) |
Uptime: | 07:11:47 |
Calls: | 501,266 |
Calls today: | 13 |
Files: | 109,409 |
D/L today: |
12,934 files (9,085M bytes) |
Messages: | 302,254 |
Posted today: | 10 |