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

change arg handling

parent e7ee31de
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
......@@ -1203,30 +1203,20 @@ function doScan()
ucfg.save();
}
if (argv[0] && argv[0].length) {
switch(argv[0].toLowerCase()) {
for(i in argv) {
switch(argv[i].toLowerCase()) {
case 'scan':
doScan();
break;
case 'pre':
if(argv[1])
runPre(argv[1].toLowerCase());
else
throw("XTRN code not included on command-line!");
runPre(argv[i+1].toLowerCase());
break;
case 'post':
if(argv[1])
runPost(argv[1].toLowerCase());
else
throw("XTRN code not included on command-line!");
runPost(argv[i+1].toLowerCase());
break;
case 'run':
// deprecated
if(argv[1])
runXtrn(argv[1].toLowerCase());
else
throw("XTRN code not included on command-line!");
runXtrn(argv[i+1].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