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
60d953c9
Commit
60d953c9
authored
5 months ago
by
Rob Swindell
Browse files
Options
Downloads
Patches
Plain Diff
sbbs_t::xfer_prot_menu() can now return the list of command keys
for use by JS bbs.xtrn_prot_menu() immediately, elsewhere soon.
parent
793cb05d
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Pipeline
#6946
passed
5 months ago
Stage: build
Stage: test
Stage: cleanup
Changes
2
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
src/sbbs3/sbbs.h
+1
-1
1 addition, 1 deletion
src/sbbs3/sbbs.h
src/sbbs3/str.cpp
+15
-6
15 additions, 6 deletions
src/sbbs3/str.cpp
with
16 additions
and
7 deletions
src/sbbs3/sbbs.h
+
1
−
1
View file @
60d953c9
...
...
@@ -765,7 +765,7 @@ public:
void
user_info
(
void
);
void
xfer_policy
(
void
);
void
xfer_prot_menu
(
enum
XFER_TYPE
);
char
*
xfer_prot_menu
(
enum
XFER_TYPE
,
user_t
*
user
=
nullptr
,
char
*
buf
=
nullptr
,
size_t
size
=
0
);
void
node_stats
(
uint
node_num
);
void
sys_stats
(
void
);
void
logonlist
(
const
char
*
args
=
""
);
...
...
This diff is collapsed.
Click to expand it.
src/sbbs3/str.cpp
+
15
−
6
View file @
60d953c9
...
...
@@ -1084,15 +1084,16 @@ const char* prot_menu_file[] = {
,
"biprot"
};
void
sbbs_t
::
xfer_prot_menu
(
enum
XFER_TYPE
type
)
char
*
sbbs_t
::
xfer_prot_menu
(
enum
XFER_TYPE
type
,
user_t
*
user
,
char
*
keys
,
size_t
size
)
{
if
(
menu
(
prot_menu_file
[
type
],
P_NOERROR
))
{
return
;
}
size_t
count
=
0
;
bool
menu_used
=
menu
(
prot_menu_file
[
type
],
P_NOERROR
);
if
(
user
==
nullptr
)
user
=
&
useron
;
cond_blankline
();
int
printed
=
0
;
for
(
int
i
=
0
;
i
<
cfg
.
total_prots
;
i
++
)
{
if
(
!
chk_ar
(
cfg
.
prot
[
i
]
->
ar
,
&
user
on
,
&
client
))
if
(
!
chk_ar
(
cfg
.
prot
[
i
]
->
ar
,
user
,
&
client
))
continue
;
if
(
type
==
XFER_UPLOAD
&&
cfg
.
prot
[
i
]
->
ulcmd
[
0
]
==
0
)
continue
;
...
...
@@ -1102,12 +1103,20 @@ void sbbs_t::xfer_prot_menu(enum XFER_TYPE type)
continue
;
if
(
type
==
XFER_BATCH_DOWNLOAD
&&
cfg
.
prot
[
i
]
->
batdlcmd
[
0
]
==
0
)
continue
;
if
(
keys
!=
nullptr
&&
count
+
1
<
size
)
keys
[
count
++
]
=
cfg
.
prot
[
i
]
->
mnemonic
;
if
(
menu_used
)
continue
;
if
(
printed
&&
(
cols
<
80
||
(
printed
%
2
)
==
0
))
CRLF
;
bprintf
(
text
[
TransferProtLstFmt
],
cfg
.
prot
[
i
]
->
mnemonic
,
cfg
.
prot
[
i
]
->
name
);
printed
++
;
}
newline
();
if
(
keys
!=
nullptr
)
keys
[
count
]
=
'\0'
;
if
(
!
menu_used
)
newline
();
return
keys
;
}
void
sbbs_t
::
node_stats
(
uint
node_num
)
...
...
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