-
bbs.logout() vs bbs.logoff() vs bbs.hangup()
From
nolageek@VERT/CAPSHRIL to
All on Thu Mar 24 23:50:31 2016
I'm still working on my shell and I'm trying to fine tune how I'd like my twoãlogout options to work.ããã'Regular Log Out' (runs a one liner, then asks user if they really want to logãout.) For this option I've been using bbs.logoff(), but it uses noyes (no isãthe default) - I'd rather it be yesno (yes being the default) I figure I couldãjust use console.yesno('Log Out') and log them out if they reply yes. But I'mãtrying to choose the most appropriate function: bbs.logout(), bbs.logoff() orãbbs.hangup()ããã(I also have a 'Fast Log Out' which immediately logs then out without anyãprompts whatsoever.)ããSo for both of them I need to hang them up, either after being prompt orãimmediately.ããI've been using bbs.hangup(); to just drop carrier, but I was wondering ifãthat's the best way or not.ããI see that bbs.logout() is listed as 'non-interactive' but it doesn't seem toãdo anything - it just takes me right back to the menu.ããI also see that bbs.logoff() can take an prompt argument but I've triedãmultiple ways and they all continue to prompt the user: bbs.logoff('false'),ãbbs.logoff(false), bbs.logoff(prompt=false), bbs.logoff('prompt=false'), etc...ãããTl;drãHow can I immediately log off the user without prompting them? bbs.logoff(),ãbbs.logout(), bbs.hangup() ?ãã|01-|03nolageekãã---ã þ Synchronet þ Capitol Shrill BBS - Washington, DC - capitolshrill.comã
-
From
echicken@VERT/ECBBS to
nolageek on Fri Mar 25 12:30:58 2016
I also see that bbs.logoff() can take an prompt argument but I've triedã> multiple ways and they all continue to prompt the user: bbs.logoff('false'),ã> bbs.logoff(false), bbs.logoff(prompt=false), bbs.logoff('prompt=false'),ã> etc...ããbbs.logoff(false) works for me, and I would expect it to do what you want. Iãam still on 3.16 though, so perhaps something has changed since then.ãã---ãechicken ãelectronic chicken bbs - bbs.electronicchicken.com - 416-273-7230ã þ Synchronet þ electronic chicken bbs - bbs.electronicchicken.comã
-
From
nolageek@VERT/CAPSHRIL to
echicken on Fri Mar 25 22:04:44 2016
Re: bbs.logout() vs bbs.logoff() vs bbs.hangup()ã By: echicken to nolageek on Fri Mar 25 2016 12:30 pmãã ec> bbs.logoff(false) works for me, and I would expect it to do what you want.ã ec> I am still on 3.16 though, so perhaps something has changed since then.ããI'll have to try them again in a bit. So close.ããOne last thing I'm trying to let the user edit is their signature. Do youãknow what is that stored as? It's not user.signature :)ãã|01-|03nolageekãã---ã þ Synchronet þ Capitol Shrill BBS - Washington, DC - capitolshrill.comã
-
From
echicken@VERT/ECBBS to
nolageek on Sat Mar 26 14:28:16 2016
One last thing I'm trying to let the user edit is their signature. Do youã> know what is that stored as? It's not user.signature :)ããI believe it's stored in 'data/user/####.sig', so something like this ought toãwork:ããconsole.editfile(format('%suser/%04d.sig', system.data_dir, user.number));ãã---ãechicken ãelectronic chicken bbs - bbs.electronicchicken.com - 416-273-7230ã þ Synchronet þ electronic chicken bbs - bbs.electronicchicken.comã
-
From
Digital Man@VERT to
nolageek on Mon Mar 28 16:44:27 2016
Re: bbs.logout() vs bbs.logoff() vs bbs.hangup()ã By: nolageek to All on Thu Mar 24 2016 11:50 pmãã > I'm still working on my shell and I'm trying to fine tune how I'd like myã > two logout options to work.ã >ã >ã > 'Regular Log Out' (runs a one liner, then asks user if they really want toã > log out.) For this option I've been using bbs.logoff(), but it uses noyesã > (no is the default) - I'd rather it be yesno (yes being the default) Iã > figure I could just use console.yesno('Log Out') and log them out if theyã > reply yes. But I'm trying to choose the most appropriate function:ã > bbs.logout(), bbs.logoff() or bbs.hangup()ã >ã >ã > (I also have a 'Fast Log Out' which immediately logs then out without anyã > prompts whatsoever.)ã >ã > So for both of them I need to hang them up, either after being prompt orã > immediately.ã >ã > I've been using bbs.hangup(); to just drop carrier, but I was wondering ifã > that's the best way or not.ã >ã > I see that bbs.logout() is listed as 'non-interactive' but it doesn't seemã > to do anything - it just takes me right back to the menu.ã >ã > I also see that bbs.logoff() can take an prompt argument but I've triedã > multiple ways and they all continue to prompt the user: bbs.logoff('false'),ã > bbs.logoff(false), bbs.logoff(prompt=false), bbs.logoff('prompt=false'),ã > etc...ã >ã >ã > Tl;drã > How can I immediately log off the user without prompting them? bbs.logoff(),ã > bbs.logout(), bbs.hangup() ?ããbbs.hangup() will do that.ããYou don't need/want to call bbs.logout() normally. That's really only neededãfor a "re-login" or "change user" type of feature. When the user isãdisconnected in any way, the bbs.logout() logic is executed automatically, youãdon't need to force it.ããbbs.logoff() starts interactive stuff before hanging up. If don't want anythingãinteractive before disconnecting the user, bbs.hangup() is all you need to do.ãã digital manããSynchronet "Real Fact" #83:ãThe Electronic Frontier Foundation used to run Synchronet (circa 1993).ãNorco, CA WX: 59.6øF, 56.0% humidity, 14 mph NNE wind, 0.00 inches rain/24hrsã---ã þ Synchronet þ Vertrauen þ Home of Synchronet þ [vert/cvs/bbs].synchro.netã