diff --git a/xtrn/ddfilelister/ddfilelister.js b/xtrn/ddfilelister/ddfilelister.js index bfda9f42f2eaae636fde4ada5a1f6235bda625ae..d6135a4777b5fab6631d86ad0d3cd65531eb2478 100644 --- a/xtrn/ddfilelister/ddfilelister.js +++ b/xtrn/ddfilelister/ddfilelister.js @@ -4055,7 +4055,10 @@ function parseArgs(argv) // The 2nd argument is the mode/behavior bits in either case var FLBehavior = parseInt(argv[1]); if (isNaN(FLBehavior)) + { + if (user.is_sysop) console.print("Fuck!\r\n\x01p"); // Temporary return false; + } else gListBehavior = FLBehavior; // If the 'no header' option was passed, then disable that @@ -4069,17 +4072,28 @@ function parseArgs(argv) // 2 args - Scanning/searching if (argv.length == 2) { - // - 0: Bool (scanning all directories): 0/1 - // - 1: FL_ mode value - gScanAllDirs = (argv[0] == "1"); - if ((FLBehavior & FL_ULTIME) == FL_ULTIME) - gScriptMode = MODE_NEW_FILE_SEARCH; - else if ((FLBehavior & FL_FINDDESC) == FL_FINDDESC || (FLBehavior & FL_EXFIND) == FL_EXFIND) - gScriptMode = MODE_SEARCH_DESCRIPTION; - if ((FLBehavior & FL_VIEW) == FL_VIEW) + // When used as the Scan Dirs lodable module (no longer recommended): + if (argv[0] == "0" || argv[0] == "1") { - // View ZIP/ARC/GIF etc. info - // TODO: Not sure what to do with this + // - 0: Bool (scanning all directories): 0/1 + // - 1: FL_ mode value + gScanAllDirs = (argv[0] == "1"); + if ((FLBehavior & FL_ULTIME) == FL_ULTIME) + gScriptMode = MODE_NEW_FILE_SEARCH; + else if ((FLBehavior & FL_FINDDESC) == FL_FINDDESC || (FLBehavior & FL_EXFIND) == FL_EXFIND) + gScriptMode = MODE_SEARCH_DESCRIPTION; + if ((FLBehavior & FL_VIEW) == FL_VIEW) + { + // View ZIP/ARC/GIF etc. info + // TODO: Not sure what to do with this + } + } + // When used as the List Files loadable module: First arg is a directory internal code + // and 2nd arg is 0 or 1 + else if (/^[^\s]+$/.test(argv[0]) && (argv[1] == "0" || argv[1] == "1")) + { + // - 0: Directory internal code + // - 1: Bool (scanning all directories): 0/1 } } // 3 args - Listing