Subj : Re: .JS as a Command Shell To : Tracker1 From : Nightfox Date : Thu Nov 19 2009 02:14 pm 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 .