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?
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.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.
case 'Q':
user.command_shell="DEFAULT";
exit(0);
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':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
user.command_shell="DEFAULT";
exit(0);
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.
Sysop: | fluid |
---|---|
Location: | wickliffe, ohio |
Users: | 4 |
Nodes: | 10 (0 / 10) |
Uptime: | 140:28:44 |
Calls: | 50 |
Files: | 15,838 |
Messages: | 49,859 |