From f4e89aa0e1a91d4f84bcaebb7eaa126cebd46c40 Mon Sep 17 00:00:00 2001 From: Rob Swindell <rob@synchro.net> Date: Sat, 19 Sep 2020 22:50:23 -0700 Subject: [PATCH] Re-enable the short inactivity timeout for non-terminal connections (bots) As of Oct-25-2018, the NO_EXASCII flag was set in the autoterm variable when there was no ANSI terminal auto-detected. This defeated the short inactivity timeout feature of login.js because it was checking specifically for a zero-value autoterm. So change this logic to check for no ANSI, PETSCII, or UTF-8 (the 3 indicators of a valid terminal) - though I suppose PETSCII is questionable (it's not actually auto-detected, just a non-standard port usually). --- exec/login.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/exec/login.js b/exec/login.js index 4afffb21a7..5c34a90247 100644 --- a/exec/login.js +++ b/exec/login.js @@ -24,7 +24,7 @@ var guest = options.guest && system.matchuser("guest"); if(!bbs.online) exit(); -if(!console.autoterm) { +if(!(console.autoterm&(USER_ANSI | USER_PETSCII | USER_UTF8))) { console.inactivity_hangup = options.inactive_hangup; log(LOG_NOTICE, "terminal not detected, reducing inactivity hang-up timeout to " + console.inactivity_hangup + " seconds"); } -- GitLab