• Coding shell switching in

    From Khelair@VERT/TINFOIL to All on Fri Jan 23 17:43:00 2015
    Hey, I asked a few times in Synchronet IRC, but I do believe that people were too busy for quasi-synchronous communication at the time, so I figured I'd post here a little bit about it.
    I'm still working on development of the same shell that I was previously. The last real step I need to finish before I roll it out for alpha/beta people to start peeking at is being able to let them switch back from that shell to something else when they find areas that it's helplessly broken, and when they want to access functionality that I simply don't have coded in yet...
    So I started using bbs.select_shell(). Now I just realized that part of the problem might be that I'm currently debugging it as a door, and not as a shell, so let me know if that's my primary fubar and I'll just shut up and slink away. *grin*
    Anyway, I realized that after pulling up the correct routine for selecting a new shell, I'm still stuck in my code. Is that something where I need to actively search out the shell that I've switched to, clean up my shell's environment, and jump to that code? The other 'shell' methods that I've seen don't seem to have anything to do with activating a new shell. I just don't want users to have to log out and log back in in order to get to the new shell.
    Like I said, I'm having an inkling now that this might just be due to the fact that I'm debugging it as a door; if so, sorry to waste your time, but feel free to poke fun of me a bit! :)

    ---
    þ Synchronet þ Tinfoil Tetrahedron BBS telnet://tinfoil.synchro.net
  • From Nightfox@VERT/DIGDIST to Khelair on Sun Jan 25 03:50:00 2015
    Re: Coding shell switching into a shell
    By: Khelair to All on Fri Jan 23 2015 22:43:20

    So I started using bbs.select_shell(). Now I just realized that part of the problem might be that I'm currently debugging it as a door, and not as a shell, so let me know if that's my primary fubar and I'll just shut up and slink away. *grin*

    You should probably debug it with it set up as a shell rather than a door.

    Anyway, I realized that after pulling up the correct routine for selecting a new shell, I'm still stuck in my code. Is that something where I need to actively search out the shell that I've switched to, clean up my shell's 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
  • From Khelair@VERT/TINFOIL to Nightfox on Sun Jan 25 08:55:00 2015
    Re: Coding shell switching into a shell
    By: Nightfox to Khelair on Sun Jan 25 2015 08:50:29

    You should probably debug it with it set up as a shell rather than a door.

    Anyway, I realized that after pulling up the correct routine for select a new shell, I'm still stuck in my code. Is that something where I need actively search out the shell that I've switched to, clean up my shell' 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 cal 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 shel 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 necess

    Yeah, turns out that that's what did it. Works in both versions (door and shell), but since I'm so close to alpha testing this I just decided to start testing exclusively in shell mode.

    -=-
    Borg Burger: We do it our way; your way is irrelevant.

    ---
    þ Synchronet þ Tinfoil Tetrahedron BBS telnet://tinfoil.synchro.net
  • From Digital Man@VERT to Khelair on Sun Jan 25 20:57:00 2015
    Re: Coding shell switching into a shell
    By: Khelair to Nightfox on Sun Jan 25 2015 01:55 pm

    Re: Coding shell switching into a shell
    By: Nightfox to Khelair on Sun Jan 25 2015 08:50:29

    You should probably debug it with it set up as a shell rather than a door.

    Anyway, I realized that after pulling up the correct routine for select a new shell, I'm still stuck in my code. Is that something where I need actively search out the shell that I've switched to, clean up my shell' 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 cal 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 shel 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 necess

    Yeah, turns out that that's what did it. Works in both versions (door and shell), but since I'm so close to alpha testing this I just decided to start testing exclusively in shell mode.

    Checkout exec/lbshell.js. It allows you to select/change shells dynamically.

    digital man

    Synchronet "Real Fact" #55:
    Synchronet Terminal Server introduced SecureShell (SSH) support w/v3.14a (2006).
    Norco, CA WX: 65.3øF, 29.0% humidity, 5 mph NNW wind, 0.00 inches rain/24hrs

    ---
    þ Synchronet þ Vertrauen þ Home of Synchronet þ [vert/cvs/bbs].synchro.net
  • From Khelair@VERT/TINFOIL to Digital Man on Mon Jan 26 01:29:00 2015
    Re: Coding shell switching into a shell
    By: Digital Man to Khelair on Mon Jan 26 2015 01:57:51

    Checkout exec/lbshell.js. It allows you to select/change shells dynamically.

    Wilco. Thnx.

    -=-
    Borg Burger: We do it our way; your way is irrelevant.

    ---
    þ Synchronet þ Tinfoil Tetrahedron BBS telnet://tinfoil.synchro.net