Skip to content
Snippets Groups Projects
Commit 4fb69a36 authored by Michael Long's avatar Michael Long
Browse files

deuce feedback

parent 63912e82
No related branches found
No related tags found
2 merge requests!463MRC mods by Codefenix (2024-10-20),!79update doorscan to work with current synchronet pre/post xtrn modules
......@@ -998,7 +998,7 @@ function runXtrn(xtrn)
function runPre(xtrn)
{
if(xtrn_area.prog[xtrn]==undefined)
if(xtrn_area.prog[xtrn]===undefined)
throw("Unknown external: "+xtrn);
if(!xtrn_area.prog[xtrn].can_run)
throw("User "+user.name+" is not allowed to run "+xtrn);
......@@ -1011,19 +1011,19 @@ function runPre(xtrn)
dcfg.save();
var ucfg=new UserConfig(user.number, true);
if(ucfg.door[xtrn] == undefined) {
if(ucfg.global == undefined || (!ucfg.global.noAutoScan)) {
if(ucfg.door[xtrn] === undefined) {
if(ucfg.global === undefined || (!ucfg.global.noAutoScan)) {
ucfg.addxtrn(xtrn);
}
}
if(ucfg.door[xtrn] != undefined)
if(ucfg.door[xtrn] !== undefined)
ucfg.door[xtrn].lastRan=now;
ucfg.save();
if(!(dcfg.door[xtrn]!=undefined && dcfg.door[xtrn].skip != undefined && dcfg.door[xtrn].skip)
|| !(dcfg.skipSection[xtrn_area.prog[xtrn].sec_code]!=undefined && dcfg.skipSection[xtrn_area.prog[xtrn].sec_code])) {
if(!(dcfg.door[xtrn]!==undefined && dcfg.door[xtrn].skip !== undefined && dcfg.door[xtrn].skip)
|| !(dcfg.skipSection[xtrn_area.prog[xtrn].sec_code]!==undefined && dcfg.skipSection[xtrn_area.prog[xtrn].sec_code])) {
bbs.log_str("DOORSCAN - "+xtrn+" starting @ "+now.toString()+"\r\n");
}
}
......@@ -1033,8 +1033,8 @@ function runPost(xtrn)
now=new Date();
dcfg=new DoorConfig(true);
if(!(dcfg.door[xtrn]!=undefined && dcfg.door[xtrn].skip != undefined && dcfg.door[xtrn].skip)
&& !(dcfg.skipSection[xtrn_area.prog[xtrn].sec_code]!=undefined && dcfg.skipSection[xtrn_area.prog[xtrn].sec_code])) {
if(!(dcfg.door[xtrn]!==undefined && dcfg.door[xtrn].skip !== undefined && dcfg.door[xtrn].skip)
&& !(dcfg.skipSection[xtrn_area.prog[xtrn].sec_code]!==undefined && dcfg.skipSection[xtrn_area.prog[xtrn].sec_code])) {
bbs.log_str("DOORSCAN - "+xtrn+" ending @ "+now.toString()+"\r\n");
}
......@@ -1042,7 +1042,7 @@ function runPost(xtrn)
dcfg.save();
ucfg=new UserConfig(user.number, true);
if(ucfg.door[xtrn] != undefined) {
if(ucfg.door[xtrn] !== undefined) {
ucfg.door[xtrn].lastExit=now;
ucfg.door[xtrn].lastRunCount=dcfg.door[xtrn].runCount;
}
......@@ -1209,14 +1209,14 @@ for(i in argv) {
doScan();
break;
case 'pre':
runPre(argv[i+1].toLowerCase());
runPre(argv[++i].toLowerCase());
break;
case 'post':
runPost(argv[i+1].toLowerCase());
runPost(argv[++i].toLowerCase());
break;
case 'run':
// deprecated
runXtrn(argv[i+1].toLowerCase());
runXtrn(argv[++i].toLowerCase());
break;
case 'config':
new UserConfig(user.number).configure();
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment