Subj : Help (again
To : All
From : Glucose Grin
Date : Mon Nov 01 2004 02:44 pm
Hi there.
I've forgotten how to write a login script in js :( I know I had one that
worked (at least I think I did), but it didn't look like this....
load("sbbsdefs.js");
var uname, LoggedIn;
bbs.logout();
node_action = NODE_LOGON;
while (bbs.online && (!LoggedIn)) {
printf("\r\n\1nEnter Name, Number, '\1hNew\1n', or
'\1hGuest\1n'\r\nNN...: ");
uname=console.getstr("",25,K_LOWPRIO+K_E71DETECT+K_TAB+K_UPRLWR);
truncsp(uname);
if (uname=="")
{
printf("Blank");
bbs.hangup;
}
if (uname=="New")
{
printf("New");
bbs.newuser;
bbs.logon;
}
if (bbs.login(uname,"PW: "))
{
printf (user.name+" login complete?!?");
if (bbs.logon)
{
printf (user.name+" logon executed");
if (user.name == "") {LoggedIn=false};
if (!LoggedIn){printf("\r\nLog on procedure Failed for
unknown reasons.\r\n")};
}
}
}
What happens is that it runs thru, the user.name remains blank after
bbs.logon is executed, even tho bbs.login and bbs.logon are both successful.
if I don't loop with the LoggedIn variable, sbbs drops to an error (user not
logged in) to the console, and 11/1 02:45:20p Node 1 !ERROR 13 (WinError
158) in answer.cpp line 281 checking "User not logged on" access=0
in the log.
Any ideas as to what I'm doing wrong?
Also, the newer DOVE-Net areas (like this one) arn't on my system. a little
off-topic, but is there an easy way to add these?
Thanks.
Glucose Grin
---
� Synchronet � Vertrauen � Home of Synchronet � telnet://vert.synchro.net