Skip to content
Snippets Groups Projects
Commit 2efd7067 authored by rswindell's avatar rswindell
Browse files

As PSI-Jack pointed out, detecting fast-logons in login.js does not help

with logins via SSH or RLogin (handled in answer.cpp). So revert login.js
back to rev 1.17 since the fast-logons are now detected in the login name
parsing in login.cpp's sbbs_t::parse_login() which is used in answer() and
login() - called via bbs.login().

So... if you're writing a login matrix or custom login module where you want
to use a *different* method of detecting/enabling fast logon support, you'll
just need to set the SS_FASTLOGON flag in the JS bbs.sys_status property:
    bbs.sys_status |= SS_FASTLOGON;

This also means that 2 modopts.ini options (fast_logon and
fast_logon_requirments) are now used in logon.js, not login.js, so the section
where you add them is now [logon], not [login]. Got it? Good. :-)
parent 12768c74
No related branches found
No related tags found
No related merge requests found
......@@ -61,15 +61,8 @@ for(var c=0; c < options.login_prompts; c++) {
}
continue;
}
var fast_logon = false;
if(str.charAt(0) === (options.fast_logon_char || '!')) {
str = str.substr(1);
fast_logon = true;
}
// Continue normal login (prompting for password)
if(bbs.login(str, "\1n\1c\1hPW:\b\b\bPassword: \1w")) {
if(fast_logon && options.fast_logon == true && user.compare_ars(options.fast_logon_requirements))
bbs.fast_logon = true; // logon.js checks this variable to perform a fast-logon
bbs.logon();
exit();
}
......
......@@ -113,7 +113,8 @@ if(user.security.exemptions&UFLAG_H)
* Replaces the 2.1 Logon stuff
******************************/
if(bbs.fast_logon !== true) {
if(options.fast_logon !== true || !(bbs.sys_status&SS_FASTLOGON)
|| !user.compare_ars(options.fast_logon_requirements)) {
// Logon screens
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment