• Can't get new shell to load

    From nelgin@VERT/EOTLBBS to Digital Man on Sat Apr 19 03:23:16 2025
    I'm a bit stuck on how to do this with my own shell since it works with the others. I'm guessing it's because I use a 2nd menu for my default settings?

    user first loads mods/eotl.js

    At this point user.command_shell is "eotl"

    At the menu they press S for settings

    'S': { exec: 'eotl_settings.js' },

    Settings uses the old style menu. They select D for Default Settings:

    case 'D': bbs.exec('?/sbbs/mods/user_settings.js');

    If they pick a new shell, such as Synchronet Classic then user.command_shell is set accordingly ("default" in this case).

    However I still have my old menu. I've tried putting exit() in various places but didn't seem to have any effect. What am I doing wrong?

    ---
    þ Synchronet þ End Of The Line BBS - endofthelinebbs.com
  • From Digital Man@VERT to nelgin on Sat Apr 19 12:47:32 2025
    Re: Can't get new shell to load
    By: nelgin to Digital Man on Sat Apr 19 2025 03:23 am

    I'm a bit stuck on how to do this with my own shell since it works with the others. I'm guessing it's because I use a 2nd menu for my default settings?

    user first loads mods/eotl.js

    At this point user.command_shell is "eotl"

    At the menu they press S for settings

    'S': { exec: 'eotl_settings.js' },

    Settings uses the old style menu. They select D for Default Settings:

    case 'D': bbs.exec('?/sbbs/mods/user_settings.js');

    If they pick a new shell, such as Synchronet Classic then user.command_shell is set accordingly ("default" in this case).

    However I still have my old menu. I've tried putting exit() in various places but didn't seem to have any effect. What am I doing wrong?

    Not exiting the top level shell script I presume. You need to exit the script for SBBS to reload the new command shell into memory, compile and execute it.
    --
    digital man (rob)

    Breaking Bad quote #5:
    Sometimes the forbidden fruit tastes the sweetest. - Hank Schrader
    Norco, CA WX: 74.2øF, 25.0% humidity, 5 mph WSW wind, 0.00 inches rain/24hrs ---
    þ Synchronet þ Vertrauen þ Home of Synchronet þ [vert/cvs/bbs].synchro.net
  • From Nightfox@VERT/DIGDIST to nelgin on Sat Apr 19 13:34:07 2025
    Re: Can't get new shell to load
    By: nelgin to Digital Man on Sat Apr 19 2025 03:23 am

    case 'D': bbs.exec('?/sbbs/mods/user_settings.js');

    If they pick a new shell, such as Synchronet Classic then user.command_shell is set accordingly ("default" in this case).

    However I still have my old menu. I've tried putting exit() in various places but didn't seem to have any effect. What am I doing wrong?

    I ran into that a while ago. This is what I have in my (custom) JS shell for user settings (and this works for me):

    user.cached = false;
    var oldShell = user.command_shell;
    bbs.user_config(); // This could directly run user_settings.js instead 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: digitaldistortionbbs.com
  • From nelgin@VERT/EOTLBBS to Nightfox on Sun Apr 20 04:22:46 2025
    Re: Can't get new shell to load
    By: Nightfox to nelgin on Sat Apr 19 2025 13:34:07

    I ran into that a while ago. This is what I have in my (custom) JS shell for user settings (and this works for me):

    That seemed to work for me. Well, at least going back to the main menu which is where I put it. Thanks.

    ---
    þ Synchronet þ End Of The Line BBS - endofthelinebbs.com