Subj : Coding shell switching into a shell To : Khelair From : Nightfox Date : Sun Jan 25 2015 08:50 am Re: Coding shell switching into a shell By: Khelair to All on Fri Jan 23 2015 22:43:20 Kh> So I started using bbs.select_shell(). Now I just realized that part of Kh> the problem might be that I'm currently debugging it as a door, and not as Kh> a shell, so let me know if that's my primary fubar and I'll just shut up Kh> and slink away. *grin* You should probably debug it with it set up as a shell rather than a door. Kh> Anyway, I realized that after pulling up the correct routine for selecting Kh> a new shell, I'm still stuck in my code. Is that something where I need to Kh> actively search out the shell that I've switched to, clean up my shell's Kh> environment, and jump to that code? The other 'shell' methods that I've After running bbs.select_shell(), your shell might need to exit. I haven't tried using bbs.select_shell(), but in my shell I have a section where I call bbs.user_config() to let the user change their configuration options. After doing so, I check whether user.command_shell has changed, and if so, my shell calls exit(0); so that it will exit, then it drops the user into their new shell. I do a few other things around there, which may or may not be necessary (I may have seen these in other shells): var oldShell = user.command_shell; bbs.user_config(); user.cached = false; bbs.user_sync(); // If the user has chosen a different command shell, then exit // out of this one. if (user.command_shell != oldShell) exit(0); Nightfox --- þ Synchronet þ Digital Distortion BBS - digitaldistortionbbs.com .