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
f1591f88
Commit
f1591f88
authored
1 year ago
by
Rob Swindell
Browse files
Options
Downloads
Plain Diff
Merge branch 'Ree/nodelist-external-name' into 'master'
Update node action display on web See merge request
main/sbbs!329
parents
17b42ea2
a4ba1760
No related branches found
No related tags found
2 merge requests
!463
MRC mods by Codefenix (2024-10-20)
,
!329
Update node action display on web
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
exec/load/presence_lib.js
+16
-10
16 additions, 10 deletions
exec/load/presence_lib.js
webv4/lib/events/nodelist.js
+4
-1
4 additions, 1 deletion
webv4/lib/events/nodelist.js
webv4/root/api/system.ssjs
+2
-1
2 additions, 1 deletion
webv4/root/api/system.ssjs
with
22 additions
and
12 deletions
exec/load/presence_lib.js
+
16
−
10
View file @
f1591f88
...
...
@@ -138,7 +138,7 @@ function extended_status(num)
f
.
position
=
num
*
128
;
var
str
=
f
.
read
(
128
);
f
.
close
();
return
str
;
return
truncsp
(
str
)
;
}
// Returns a string describing the node status, suitable for printing on a single line
...
...
@@ -148,11 +148,13 @@ function extended_status(num)
// options values supported/used:
// .include_age
// .include_gender
// .exclude_username
// .username_prefix
// .status_prefix
// .age_prefix
// .gender_prefix
// .gender_separator
// .exclude_connection
// .connection_prefix
// .errors_prefix
function
node_status
(
node
,
is_sysop
,
options
,
num
)
...
...
@@ -174,12 +176,14 @@ function node_status(node, is_sysop, options, num)
}
var
user
=
new
User
(
node
.
useron
);
if
(
options
.
username_prefix
)
output
+=
options
.
username_prefix
;
if
(
js
.
global
.
bbs
&&
(
misc
&
NODE_ANON
)
&&
!
is_sysop
)
output
+=
bbs
.
text
(
UNKNOWN_USER
);
else
output
+=
user
.
alias
;
if
(
!
options
.
exclude_username
)
{
if
(
options
.
username_prefix
)
output
+=
options
.
username_prefix
;
if
(
js
.
global
.
bbs
&&
(
misc
&
NODE_ANON
)
&&
!
is_sysop
)
output
+=
bbs
.
text
(
UNKNOWN_USER
);
else
output
+=
user
.
alias
;
}
if
(
options
.
status_prefix
)
output
+=
options
.
status_prefix
;
output
+=
user_age_and_gender
(
user
,
options
);
...
...
@@ -201,9 +205,11 @@ function node_status(node, is_sysop, options, num)
output
+=
format
(
NodeAction
[
node
.
action
],
node
.
aux
);
break
;
}
if
(
options
.
connection_prefix
)
output
+=
options
.
connection_prefix
;
output
+=
node_connection_desc
(
node
);
if
(
!
options
.
exclude_connection
)
{
if
(
options
.
connection_prefix
)
output
+=
options
.
connection_prefix
;
output
+=
node_connection_desc
(
node
);
}
break
;
}
case
NODE_LOGON
:
...
...
This diff is collapsed.
Click to expand it.
webv4/lib/events/nodelist.js
+
4
−
1
View file @
f1591f88
require
(
"
presence_lib.js
"
,
'
extended_status
'
);
var
last_run
=
0
;
var
frequency
=
15
;
...
...
@@ -80,10 +82,11 @@ function scan() {
};
}
else
{
usr
.
number
=
e
.
useron
;
return
{
node
:
i
+
1
,
status
:
format
(
NodeStatus
[
e
.
status
],
e
.
aux
,
e
.
extaux
),
action
:
format
(
NodeAction
[
e
.
action
],
e
.
aux
,
e
.
extaux
),
action
:
node_status
(
e
,
user
.
is_sysop
,
{
exclude_username
:
true
,
exclude_connection
:
true
},
i
),
user
:
(
e
.
misc
&
NODE_ANON
)
&&
!
user
.
is_sysop
?
"
Anonymous
"
:
usr
.
alias
,
connection
:
NodeConnectionProper
[
e
.
connection
]
?
NodeConnectionProper
[
e
.
connection
]
:
(
e
.
connection
+
'
bps
'
)
};
...
...
This diff is collapsed.
Click to expand it.
webv4/root/api/system.ssjs
+
2
−
1
View file @
f1591f88
require
(
'
sbbsdefs.js
'
,
'
SYS_CLOSED
'
);
require
(
'
nodedefs.js
'
,
'
NODE_WFC
'
);
require
(
"
presence_lib.js
"
,
'
extended_status
'
);
var
settings
=
load
(
'
modopts.js
'
,
'
web
'
)
||
{
web_directory
:
'
../webv4
'
};
load
(
settings
.
web_directory
+
'
/lib/init.js
'
);
...
...
@@ -42,7 +43,7 @@ if ((http_request.method === 'GET' || http_request.method === 'POST') && http_re
a
.
push
({
node
:
i
,
status
:
format
(
NodeStatus
[
c
.
status
],
c
.
aux
,
c
.
extaux
),
action
:
format
(
NodeAction
[
c
.
action
],
c
.
aux
,
c
.
extaux
),
action
:
node_status
(
c
,
user
.
is_sysop
,
{
exclude_username
:
true
,
exclude_connection
:
true
},
i
),
user
:
usr
.
alias
,
connection
:
usr
.
connection
});
...
...
This diff is collapsed.
Click to expand it.
Rob Swindell
@rswindell
mentioned in issue
#618 (closed)
·
1 year ago
mentioned in issue
#618 (closed)
mentioned in issue #618
Toggle commit list
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