From b8cc67879aa353e6e469a22be863d8c87ecbb32a Mon Sep 17 00:00:00 2001 From: Eric Oulashin <nightfox@synchro.net> Date: Sat, 11 Feb 2023 22:25:17 +0000 Subject: [PATCH] SlyEdit: Small fix for sysop checking (didn't catch it in the earlier refactor) --- exec/SlyEdit_Misc.js | 16 ++++------------ 1 file changed, 4 insertions(+), 12 deletions(-) diff --git a/exec/SlyEdit_Misc.js b/exec/SlyEdit_Misc.js index f9ff2b0d64..3a2e02a36c 100644 --- a/exec/SlyEdit_Misc.js +++ b/exec/SlyEdit_Misc.js @@ -4417,18 +4417,10 @@ function getUserKey(pMode, pCfgObj) var inputTimeoutMS = 300000; // If the user is a sysop, then use a much higher timeout. - if (typeof(pCfgObj) == "object") - { - if ((typeof(pCfgObj.userIsSysop) == "boolean") && pCfgObj.userIsSysop) - inputTimeoutMS = 999999; - else if (typeof(pCfgObj.userInputTimeout) == "number") - inputTimeoutMS = pCfgObj.inputTimeoutMS; - } - else if (typeof(pCfgObj) == "boolean") - { - if (pCfgObj) - inputTimeoutMS = 999999; - } + if (user.is_sysop) + inputTimeoutMS = 999999; + else if (typeof(pCfgObj) == "object" && typeof(pCfgObj.userInputTimeout) === "number") + inputTimeoutMS = pCfgObj.inputTimeoutMS; // Input a key from the user userKey = console.inkey(pMode, inputTimeoutMS); -- GitLab