Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
Synchronet
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Main
Synchronet
Commits
4fb69a36
Commit
4fb69a36
authored
4 years ago
by
Michael Long
Browse files
Options
Downloads
Patches
Plain Diff
deuce feedback
parent
63912e82
No related branches found
No related tags found
2 merge requests
!463
MRC mods by Codefenix (2024-10-20)
,
!79
update doorscan to work with current synchronet pre/post xtrn modules
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
xtrn/doorscan/doorscan.js
+49
-49
49 additions, 49 deletions
xtrn/doorscan/doorscan.js
with
49 additions
and
49 deletions
xtrn/doorscan/doorscan.js
+
49
−
49
View file @
4fb69a36
...
...
@@ -153,30 +153,30 @@ function Display_LORD(filename)
case
'
r
'
:
ch
=
txt
.
charAt
(
++
i
);
switch
(
ch
)
{
case
'
0
'
:
console
.
attributes
=
BG_BLACK
;
break
;
case
'
1
'
:
console
.
attributes
=
BG_BLUE
;
break
;
case
'
2
'
:
console
.
attributes
=
BG_GREEN
;
break
;
case
'
3
'
:
console
.
attributes
=
BG_CYAN
;
break
;
case
'
4
'
:
console
.
attributes
=
BG_RED
;
break
;
case
'
5
'
:
console
.
attributes
=
BG_MAGENTA
;
break
;
case
'
6
'
:
console
.
attributes
=
BG_BROWN
;
break
;
case
'
7
'
:
console
.
attributes
=
BG_LIGHTGRAY
;
break
;
case
'
0
'
:
console
.
attributes
=
BG_BLACK
;
break
;
case
'
1
'
:
console
.
attributes
=
BG_BLUE
;
break
;
case
'
2
'
:
console
.
attributes
=
BG_GREEN
;
break
;
case
'
3
'
:
console
.
attributes
=
BG_CYAN
;
break
;
case
'
4
'
:
console
.
attributes
=
BG_RED
;
break
;
case
'
5
'
:
console
.
attributes
=
BG_MAGENTA
;
break
;
case
'
6
'
:
console
.
attributes
=
BG_BROWN
;
break
;
case
'
7
'
:
console
.
attributes
=
BG_LIGHTGRAY
;
break
;
}
break
;
case
'
c
'
:
...
...
@@ -554,7 +554,7 @@ function UserConfig_configure_sec(dcfg, sec)
r
=
ascii
(
'
N
'
);
}
console
.
uselect
(
index
.
length
,
"
External News Scores Run Count
"
,
format
(
"
%-40s %c %c %c
"
,
xtrn_area
.
prog
[
door
].
name
,
n
,
s
,
r
));
,
format
(
"
%-40s %c %c %c
"
,
xtrn_area
.
prog
[
door
].
name
,
n
,
s
,
r
));
}
if
(
!
index
.
length
)
return
;
...
...
@@ -582,8 +582,8 @@ function UserConfig_configure_sec(dcfg, sec)
else
this
.
door
[
index
[
xprog
-
1
]].
skipRunCount
=!
console
.
yesno
(
"
Show run counts
"
);
if
(
this
.
door
[
index
[
xprog
-
1
]].
skipRunCount
&&
this
.
door
[
index
[
xprog
-
1
]].
skipScore
&&
this
.
door
[
index
[
xprog
-
1
]].
skipNews
)
&&
this
.
door
[
index
[
xprog
-
1
]].
skipScore
&&
this
.
door
[
index
[
xprog
-
1
]].
skipNews
)
delete
this
.
door
[
index
[
xprog
-
1
]];
}
}
...
...
@@ -794,7 +794,7 @@ function sysop_get_newstype(dflt)
if
(
i
<
1
||
i
>
index
.
length
)
return
(
dflt
);
return
(
index
[
i
-
1
]);
}
function
sysop_get_scorestype
(
dflt
)
...
...
@@ -905,7 +905,7 @@ function sysop_config_skip(dcfg)
for
(
sec
in
xtrn_area
.
sec
)
{
index
.
push
(
sec
);
console
.
uselect
(
index
.
length
,
"
External Program Section
"
,
format
(
"
%-40s %s
"
,
xtrn_area
.
sec
[
sec
].
name
format
(
"
%-40s %s
"
,
xtrn_area
.
sec
[
sec
].
name
,(
dcfg
.
skipSection
[
sec
]
!=
undefined
&&
dcfg
.
skipSection
[
sec
])?
"
Skip
"
:
"
Include
"
));
}
if
(
index
.
length
==
0
)
...
...
@@ -970,7 +970,7 @@ function runXtrn(xtrn)
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
]))
{
||
!
(
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
"
);
}
...
...
@@ -980,7 +980,7 @@ function runXtrn(xtrn)
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
]))
{
&&
!
(
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
"
);
}
...
...
@@ -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
;
}
...
...
@@ -1072,7 +1072,7 @@ function doScan()
continue
;
if
(
dcfg
.
door
[
door
].
installed
>
ucfg
.
global
.
lastScan
)
{
/* This door is NEW! */
/* If the user can't run it, don't display it. */
if
(
!
xtrn_area
.
prog
[
door
].
can_run
)
continue
;
...
...
@@ -1131,7 +1131,7 @@ function doScan()
* If the news file has not been updated, don't bother
* Some doors only update the news during maintenance
*/
if
(
new
Date
(
file_date
(
dcfg
.
door
[
door
].
news
)
*
1000
)
>=
scantime
)
{
/* Assume ANSI */
if
(
dcfg
.
door
[
door
].
newsType
==
undefined
)
...
...
@@ -1152,7 +1152,7 @@ function doScan()
* If the Scores file has not been updated, don't bother
* Some doors only update the Scores during maintenance
*/
if
(
new
Date
(
file_date
(
dcfg
.
door
[
door
].
score
)
*
1000
)
>=
scantime
)
{
/* Assume ANSI */
if
(
dcfg
.
door
[
door
].
scoreType
==
undefined
)
...
...
@@ -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
());
break
;
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
();
...
...
@@ -1227,7 +1227,7 @@ for(i in argv) {
case
'
rank
'
:
// TODO: Door popularity rankings
break
;
default
:
break
;
default
:
break
;
}
}
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment