-
Help (again
From
Glucose Grin@VERT to
All on Mon Nov 1 13:44:46 2004
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 þ [vert/cvs/bbs].synchro.netã
-
From
Angus Mcleod@VERT/ANJO to
Glucose Grin on Mon Nov 1 20:12:00 2004
Re: Help (againã By: Glucose Grin to All on Mon Nov 01 2004 13:44:00ããNot related to your problem, but I think that this line:ãã > printf("\r\n\1nEnter Name, Number, '\1hNew\1n', orã > '\1hGuest\1n'\r\nNN...: ");ããwill break login scripts that look for "NN:" and not "NN...:"ãããã---ã þ Synchronet þ Making sure Jason works OK at The ANJO BBSã
-
From
Digital Man@VERT to
Glucose Grin on Mon Nov 1 16:49:08 2004
Re: Help (againã By: Glucose Grin to All on Mon Nov 01 2004 01: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;ããThe correct way to call a JavaScript function is with () after the functionãname. Example: bbs.hangup();ãã > if (uname=="New")ã > {ã > printf("New");ã > bbs.newuser;ã > bbs.logon;ããSame problem here.ãã > }ã > if (bbs.login(uname,"PW: "))ã > {ã > printf (user.name+" login complete?!?");ã > if (bbs.logon)ããAnd here.ãã > {ã > printf (user.name+" logon executed");ã > if (user.name == "") {LoggedIn=false};ã > if (!LoggedIn){printf("\r\nLog on procedure Failed foã > 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.ããYou're not actually *calling* these functions, so I would expect all kinds ofãthings to go wrong.ãã > Any ideas as to what I'm doing wrong?ããYeah, you're missing the () :-)ãã > 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?ãã
http://synchro.net/docs/dove-net.txtãã digital manããSnapple "Real Fact" #104:ãThere are more then 30,000 diets on public record.ã---ã þ Synchronet þ Vertrauen þ Home of Synchronet þ [vert/cvs/bbs].synchro.netã
-
From
Glucose Grin@VERT to
Digital Man on Mon Nov 1 17:06:38 2004
ã > Yeah, you're missing the () :-)ããHahah... Okay. Yea. I remember now. I don't do much programming :)ããThanks tho. I guess I should go read a book, eh?ããGlucose Grinãã---ã þ Synchronet þ Vertrauen þ Home of Synchronet þ [vert/cvs/bbs].synchro.netã
-
From
Glucose Grin@VERT to
Angus Mcleod on Mon Nov 1 17:08:53 2004
ã > Not related to your problem, but I think that this line:ã > will break login scripts that look for "NN:" and not "NN...:"ããYou're right, I was just adding dots when I was first writing, to ãdifferentiate between the stock script and my own when I first connect. By ãthe time I'm done (if I'm ever done) things should be okay :)ããGlucose Grinãã---ã þ Synchronet þ Vertrauen þ Home of Synchronet þ [vert/cvs/bbs].synchro.netã
-
From
Tracker1@VERT/TRN to
Glucose Grin on Mon Nov 1 19:26:00 2004
Glucose Grin wrote:ã> 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....ã> --snip-- <ã> if (bbs.login(uname,"PW: "))ã> {ã> printf (user.name+" login complete?!?");ã> if (bbs.logon)ã> --snip-- <ã> 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.ããbbs.logon()ãis a function, not a parameter...ããAfter bbs.logon() you should exit out of the script, technically, anything ãafter it will run between the LOGON event, and the COMMAND SHELL running.ãã-- ãMichael J. Ryan - tracker1(at)theroughnecks(dot)net - www.theroughnecks.netãicq: 4935386 - AIM/AOL: azTracker1 - Y!: azTracker1 - MSN/Win: (email)ãã---ã þ Synchronet þ theroughnecks.net - you know you want itã
-
From
Tracker1@VERT/TRN to
Glucose Grin on Mon Nov 1 19:29:00 2004
Glucose Grin wrote:ã>> Yeah, you're missing the () :-)ã> ã> Hahah... Okay. Yea. I remember now. I don't do much programming :)ã> ã> Thanks tho. I guess I should go read a book, eh?ããFor heavy handholding, "JavaScript for Dummies" isn't bad, I would suggestã"JavaScript Bible" by Danny Goodman 3rd or 4th edition (NOT GOLD), as theãintro sections are very thorough, and should get you going..ããThe concepts are the same for the bbs and the web for the most part,ãeven though the event model is quite a bit different.ãã-- ãMichael J. Ryan - tracker1(at)theroughnecks(dot)net - www.theroughnecks.netãicq: 4935386 - AIM/AOL: azTracker1 - Y!: azTracker1 - MSN/Win: (email)ããRules of Acquisition #211:ãEmployees are the rungs on the ladder of success... don't hesitate to stepãon them.ãã---ã þ Synchronet þ theroughnecks.net - you know you want itã
-
From
Angus Mcleod@VERT/ANJO to
Glucose Grin on Mon Nov 1 22:57:00 2004
Re: Help (againã By: Glucose Grin to Digital Man on Mon Nov 01 2004 17:06:00ãã > > Yeah, you're missing the () :-)ã > ã > Hahah... Okay. Yea. I remember now. I don't do much programming :)ã > ã > Thanks tho. I guess I should go read a book, eh?ããFor heaven sake, don't do THAT! Manuals are for WHIMPS!ãã:)ããã---ã þ Synchronet þ Making sure Jason works OK at The ANJO BBSã
-
From
Glucose Grin@VERT to
Tracker1 on Mon Nov 1 20:54:08 2004
ã > For heavy handholding, "JavaScript for Dummies" isn't bad, I would suggestã > "JavaScript Bible" by Danny Goodman 3rd or 4th edition (NOT GOLD), as theã > intro sections are very thorough, and should get you going..ãã I should check one of those out. All the programming I've done has ãbeen apple][ basic, then turbo pascal 7 for dos. And I spent way too much ãtime learning hardware tricks that are now useless, instead of actual sound ãprogramming :)ãã But Javascript is good to get started again, and text mode is ãfamiliar, so I guess I'll fake my way thru some more.ãã Thanks again for the help :)ããGlucose Grinãã---ã þ Synchronet þ Vertrauen þ Home of Synchronet þ [vert/cvs/bbs].synchro.netã