Skip to content

Commit b546fce

Browse files
committed
Quick-login now works; still not able to skip req. for new message scan, though. Much closer
1 parent 02ca362 commit b546fce

1 file changed

Lines changed: 29 additions & 23 deletions

File tree

misc/logon.js

Lines changed: 29 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,9 @@ if (options && (options.rlogin_auto_xtrn) && (bbs.sys_status & SS_RLOGIN) && (co
2020
bbs.hangup();
2121
exit();
2222
}
23+
2324
//Disable spinning cursor at pause prompts
24-
//bbs.node_settings|=NM_NOPAUSESPIN
25+
bbs.node_settings|=NM_NOPAUSESPIN
2526

2627
if(user.security.restrictions&UFLAG_G) {
2728
while(bbs.online) {
@@ -84,14 +85,16 @@ if(user.security.exemptions&UFLAG_H)
8485
* Replaces the 2.1 Logon stuff
8586
******************************/
8687

87-
// Logon screens
88+
var ouah = console.noyes("Quick login? (straight to shell/no ANSI)");
89+
if (ouah) {
90+
// Logon screens
8891

89-
// Print logon screens based on security level
90-
if(file_exists(system.text_dir + "menu/logon" + user.security.level + ".*"))
92+
// Print logon screens based on security level
93+
if(file_exists(system.text_dir + "menu/logon" + user.security.level + ".*"))
9194
bbs.menu("logon" + user.security.level);
9295

93-
// Print successively numbered logon screens (logon, logon1, logon2, etc.)
94-
for(var i=0;;i++) {
96+
// Print successively numbered logon screens (logon, logon1, logon2, etc.)
97+
for(var i=0;;i++) {
9598
var fname="logon";
9699
if(i)
97100
fname+=i;
@@ -101,13 +104,14 @@ for(var i=0;;i++) {
101104
continue;
102105
}
103106
bbs.menu(fname);
104-
}
107+
}
105108

106-
// Print one of text/menu/random*.*, picked at random
107-
// e.g. random1.asc, random2.asc, random3.asc, etc.
108-
var random_list = directory(system.text_dir + "menu/random*.*");
109-
if(random_list.length)
109+
// Print one of text/menu/random*.*, picked at random
110+
// e.g. random1.asc, random2.asc, random3.asc, etc.
111+
var random_list = directory(system.text_dir + "menu/random*.*");
112+
if(random_list.length)
110113
bbs.menu(file_getname(random_list[random(random_list.length)]).slice(0,-4));
114+
}
111115

112116
console.clear();
113117
bbs.user_event(EVENT_LOGON);
@@ -190,24 +194,26 @@ if(user.settings&USER_HTML) {
190194
console.getkey();
191195
}
192196
else {
193-
// Last few callers
194-
console.aborted=false;
195-
console.clear();
196-
logonlst=system.data_dir + "logon.lst"
197-
if(file_size(logonlst)<1)
197+
if (ouah) {
198+
// Last few callers
199+
console.aborted=false;
200+
console.clear();
201+
logonlst=system.data_dir + "logon.lst"
202+
if(file_size(logonlst)<1)
198203
printf("\1n\1g\1hYou are the first caller of the day!\r\n");
199-
else {
204+
else {
200205
printf("\1n\1g\1hLast few callers:\1n\r\n");
201206
console.printtail(logonlst,4,P_NOATCODES); // args: filename, lines, mode
202-
}
203-
console.crlf();
207+
}
208+
console.crlf();
204209

205-
// Auto-message
206-
auto_msg=system.data_dir + "msgs/auto.msg"
207-
if(file_size(auto_msg)>0) {
210+
// Auto-message
211+
auto_msg=system.data_dir + "msgs/auto.msg"
212+
if(file_size(auto_msg)>0) {
208213
console.printfile(auto_msg,P_NOATCODES);
209214
console.crlf();
210-
}
215+
}
216+
}
211217
}
212218

213219
// Automatically set shell to WIPSHELL

0 commit comments

Comments
 (0)