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) ...@@ -998,7 +998,7 @@ function runXtrn(xtrn)
function runPre(xtrn) function runPre(xtrn)
{ {
if(xtrn_area.prog[xtrn]==undefined) if(xtrn_area.prog[xtrn]===undefined)
throw("Unknown external: "+xtrn); throw("Unknown external: "+xtrn);
if(!xtrn_area.prog[xtrn].can_run) if(!xtrn_area.prog[xtrn].can_run)
throw("User "+user.name+" is not allowed to run "+xtrn); throw("User "+user.name+" is not allowed to run "+xtrn);
...@@ -1011,19 +1011,19 @@ function runPre(xtrn) ...@@ -1011,19 +1011,19 @@ function runPre(xtrn)
dcfg.save(); dcfg.save();
var ucfg=new UserConfig(user.number, true); var ucfg=new UserConfig(user.number, true);
if(ucfg.door[xtrn] == undefined) { if(ucfg.door[xtrn] === undefined) {
if(ucfg.global == undefined || (!ucfg.global.noAutoScan)) { if(ucfg.global === undefined || (!ucfg.global.noAutoScan)) {
ucfg.addxtrn(xtrn); ucfg.addxtrn(xtrn);
} }
} }
if(ucfg.door[xtrn] != undefined) if(ucfg.door[xtrn] !== undefined)
ucfg.door[xtrn].lastRan=now; ucfg.door[xtrn].lastRan=now;
ucfg.save(); ucfg.save();
if(!(dcfg.door[xtrn]!=undefined && dcfg.door[xtrn].skip != undefined && dcfg.door[xtrn].skip) 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])) { || !(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"); bbs.log_str("DOORSCAN - "+xtrn+" starting @ "+now.toString()+"\r\n");
} }
} }
...@@ -1033,8 +1033,8 @@ function runPost(xtrn) ...@@ -1033,8 +1033,8 @@ function runPost(xtrn)
now=new Date(); now=new Date();
dcfg=new DoorConfig(true); dcfg=new DoorConfig(true);
if(!(dcfg.door[xtrn]!=undefined && dcfg.door[xtrn].skip != undefined && dcfg.door[xtrn].skip) 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])) { && !(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"); bbs.log_str("DOORSCAN - "+xtrn+" ending @ "+now.toString()+"\r\n");
} }
...@@ -1042,7 +1042,7 @@ function runPost(xtrn) ...@@ -1042,7 +1042,7 @@ function runPost(xtrn)
dcfg.save(); dcfg.save();
ucfg=new UserConfig(user.number, true); ucfg=new UserConfig(user.number, true);
if(ucfg.door[xtrn] != undefined) { if(ucfg.door[xtrn] !== undefined) {
ucfg.door[xtrn].lastExit=now; ucfg.door[xtrn].lastExit=now;
ucfg.door[xtrn].lastRunCount=dcfg.door[xtrn].runCount; ucfg.door[xtrn].lastRunCount=dcfg.door[xtrn].runCount;
} }
...@@ -1209,14 +1209,14 @@ for(i in argv) { ...@@ -1209,14 +1209,14 @@ for(i in argv) {
doScan(); doScan();
break; break;
case 'pre': case 'pre':
runPre(argv[i+1].toLowerCase()); runPre(argv[++i].toLowerCase());
break; break;
case 'post': case 'post':
runPost(argv[i+1].toLowerCase()); runPost(argv[++i].toLowerCase());
break; break;
case 'run': case 'run':
// deprecated // deprecated
runXtrn(argv[i+1].toLowerCase()); runXtrn(argv[++i].toLowerCase());
break; break;
case 'config': case 'config':
new UserConfig(user.number).configure(); 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