• Single key to switch command shells?

    From Digital Man@VERT to Razor on Sunday, February 28, 2010 17:25:06
    Re: Single key to switch command shells?
    By: Razor to All on Sun Feb 28 2010 08:47 am

    I'd like to "quit" from my custom shell back to the "default" shell. What I'm doing so far doesn't seem to change the user config option for command shell & disconnects me from telnet. Here's my current code:
    case 'Q':
    user.command_shell="DEFAULT";
    exit(0);

    Does anyone see an obvious error in my logic?

    The setting of the command shell looks correct, but I don't understand the use of exit(). Shells are not normally "nested". An exit() would just stop the shell.

    digital man

    Snapple "Real Fact" #77:
    No piece of paper can be folded more than 7 times.

    ---
    þ Synchronet þ Vertrauen þ Home of Synchronet þ telnet://vert.synchro.net
  • From Digital Man@VERT to Razor on Sunday, February 28, 2010 23:04:34
    Re: Single key to switch command shells?
    By: Razor to Digital Man on Sun Feb 28 2010 10:09 pm

    Re: Single key to switch command shells?
    By: Digital Man to Razor on Sun Feb 28 2010 05:25 pm

    Re: Single key to switch command shells?
    By: Razor to All on Sun Feb 28 2010 08:47 am
    I'd like to "quit" from my custom shell back to the "default" shell. case 'Q':
    user.command_shell="DEFAULT";
    exit(0);
    The setting of the command shell looks correct, but I don't understand the use of exit(). Shells are not normally "nested". An exit() would
    just stop the shell.

    Ahh, I was never executing the new shell. I still don't quite have it, but I might come back to that later.
    Now I'm trying to choose a shell from logon.js & no matter which I choose,
    I always get DEFAULT. Here's my code for that.

    if(!console.noyes("Quick logon"))
    {
    user.command_shell="RQSHELL";
    }
    else
    {
    user.command_shell="DEFAULT";
    }

    You discovered a bug with the Synchronet JS "User" class, which I just fixed. When setting the command_shell property, it was writing to the host_name / computer property instead. If you get tonight's development build (dated mar-1) this should be fixed.

    digital man

    Snapple "Real Fact" #158:
    The first MTV video was "Video Killed the Radio Star," by the Buggles.

    ---
    þ Synchronet þ Vertrauen þ Home of Synchronet þ telnet://vert.synchro.net