Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Open sidebar
Main
Synchronet
Commits
34f21397
Commit
34f21397
authored
Nov 11, 2017
by
rswindell
Browse files
Added common command-line specifier list/descriptions to online help for all
configurable command-lines.
parent
902ada66
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
45 additions
and
15 deletions
+45
-15
src/sbbs3/scfg/scfg.h
src/sbbs3/scfg/scfg.h
+20
-0
src/sbbs3/scfg/scfgchat.c
src/sbbs3/scfg/scfgchat.c
+2
-0
src/sbbs3/scfg/scfgxfr1.c
src/sbbs3/scfg/scfgxfr1.c
+14
-4
src/sbbs3/scfg/scfgxtrn.c
src/sbbs3/scfg/scfgxtrn.c
+9
-11
No files found.
src/sbbs3/scfg/scfg.h
View file @
34f21397
...
...
@@ -47,6 +47,26 @@
#define SETHELP(where) uifc.sethelp(where)
#define SCFG_CMDLINE_SPEC_HELP "\n" \
"The following is a list of commonly-used command-line specifiers:\n" \
"\n" \
" `%f` The path/filename of the file to act upon or door/game drop file\n" \
" `%s` File specification (e.g. `*.txt`) or the current `Startup Directory`\n" \
" `%!` The Synchronet `exec` directory (use `%@` for non-Unix only)\n" \
" `%.` Executable file extension (`.exe`, or blank for Unix systems)\n" \
" `%n` The current node directory\n" \
" `%#` The current node number\n" \
" `%a` The current user's alias\n" \
" `%1` The current user's number (use `%2`, `%3`, etc. for 0-padded values)\n" \
" `%h` The current TCP/IP socket descriptor (handle) value\n" \
" `%p` The current connection type (protocol, e.g. `telnet`, `rlogin`, etc.)\n" \
" `%r` The current user's terminal height (rows)\n" \
" `%w` The current user's terminal width (columns)\n" \
"\n" \
"For a complete list of the supported command-line specifiers, see:\n" \
"`http://wiki.synchro.net/config:cmdline`\n"
/*************/
/* Constants */
/*************/
...
...
src/sbbs3/scfg/scfgchat.c
View file @
34f21397
...
...
@@ -75,6 +75,7 @@ void page_cfg()
"`External Chat Pager Command Line:`
\n
"
"
\n
"
"This is the command line to execute for this external chat pager.
\n
"
SCFG_CMDLINE_SPEC_HELP
;
if
(
uifc
.
input
(
WIN_MID
|
WIN_SAV
,
0
,
0
,
"Command Line"
,
str
,
50
,
K_EDIT
)
<
1
)
...
...
@@ -140,6 +141,7 @@ void page_cfg()
"`External Chat Pager Command Line:`
\n
"
"
\n
"
"This is the command line to execute for this external chat pager.
\n
"
SCFG_CMDLINE_SPEC_HELP
;
strcpy
(
str
,
cfg
.
page
[
i
]
->
cmd
);
if
(
!
uifc
.
input
(
WIN_MID
|
WIN_SAV
,
0
,
10
,
"Command Line"
...
...
src/sbbs3/scfg/scfgxfr1.c
View file @
34f21397
...
...
@@ -242,8 +242,8 @@ void xfer_opts()
"`Viewable File Types:`
\n
"
"
\n
"
"This is a list of file types that have content information that can be
\n
"
"viewed through the execution of an external
program. Here are a couple of
\n
"
"
command line examples for a few file types.
\n
"
"viewed
on the Terminal Server
through the execution of an external
\n
"
"
program.
"
;
i
=
uifc
.
list
(
i
,
0
,
0
,
50
,
&
fview_dflt
,
NULL
,
"Viewable File Types"
,
opt
);
if
(
i
==-
1
)
...
...
@@ -330,6 +330,7 @@ void xfer_opts()
,
cfg
.
fview
[
i
]
->
ext
,
sizeof
(
cfg
.
fview
[
i
]
->
ext
)
-
1
,
K_EDIT
);
break
;
case
1
:
uifc
.
helpbuf
=
SCFG_CMDLINE_SPEC_HELP
;
uifc
.
input
(
WIN_MID
|
WIN_SAV
,
0
,
0
,
"Command"
,
cfg
.
fview
[
i
]
->
cmd
,
sizeof
(
cfg
.
fview
[
i
]
->
cmd
)
-
1
,
K_EDIT
);
...
...
@@ -361,7 +362,7 @@ void xfer_opts()
"This is a list of file types that will have a command line executed to
\n
"
"test the file integrity upon their upload. The file types are specified
\n
"
"by `extension` and if one file extension is listed more than once, each
\n
"
"command line will be executed. The command lines must return a
DOS
error
\n
"
"command line will be executed. The command lines must return a error
\n
"
"code of 0 (no error) in order for the file to pass the test. This method
\n
"
"of file testing upon upload is also known as an upload event. This test
\n
"
"or event, can do more than just test the file, it can perform any
\n
"
...
...
@@ -460,6 +461,7 @@ void xfer_opts()
,
cfg
.
ftest
[
i
]
->
ext
,
sizeof
(
cfg
.
ftest
[
i
]
->
ext
)
-
1
,
K_EDIT
);
break
;
case
1
:
uifc
.
helpbuf
=
SCFG_CMDLINE_SPEC_HELP
;
uifc
.
input
(
WIN_MID
|
WIN_SAV
,
0
,
0
,
"Command"
,
cfg
.
ftest
[
i
]
->
cmd
,
sizeof
(
cfg
.
ftest
[
i
]
->
cmd
)
-
1
,
K_EDIT
);
...
...
@@ -496,7 +498,7 @@ void xfer_opts()
"perform an event upon their download (e.g. trigger a download event).
\n
"
"The file types are specified by `extension` and if one file extension
\n
"
"is listed more than once, each command line will be executed. The
\n
"
"command lines must return a
DOS
error
code
of 0 (no error) in order
\n
"
"command lines must return a error
level
of 0 (no error) in order
\n
"
"for the file to pass the test. This test or event, can do more than
\n
"
"just test the file, it can perform any function that the sysop wishes.
\n
"
"Such as adding comments to an archived file, or extracting an archive
\n
"
...
...
@@ -593,6 +595,7 @@ void xfer_opts()
,
cfg
.
dlevent
[
i
]
->
ext
,
sizeof
(
cfg
.
dlevent
[
i
]
->
ext
)
-
1
,
K_EDIT
);
break
;
case
1
:
uifc
.
helpbuf
=
SCFG_CMDLINE_SPEC_HELP
;
uifc
.
input
(
WIN_MID
|
WIN_SAV
,
0
,
0
,
"Command"
,
cfg
.
dlevent
[
i
]
->
cmd
,
sizeof
(
cfg
.
dlevent
[
i
]
->
cmd
)
-
1
,
K_EDIT
);
...
...
@@ -717,6 +720,7 @@ void xfer_opts()
,
cfg
.
fextr
[
i
]
->
ext
,
sizeof
(
cfg
.
fextr
[
i
]
->
ext
)
-
1
,
K_EDIT
);
break
;
case
1
:
uifc
.
helpbuf
=
SCFG_CMDLINE_SPEC_HELP
;
uifc
.
input
(
WIN_MID
|
WIN_SAV
,
0
,
0
,
"Command"
,
cfg
.
fextr
[
i
]
->
cmd
,
sizeof
(
cfg
.
fextr
[
i
]
->
cmd
)
-
1
,
K_EDIT
);
...
...
@@ -834,6 +838,7 @@ void xfer_opts()
,
cfg
.
fcomp
[
i
]
->
ext
,
sizeof
(
cfg
.
fcomp
[
i
]
->
ext
)
-
1
,
K_EDIT
);
break
;
case
1
:
uifc
.
helpbuf
=
SCFG_CMDLINE_SPEC_HELP
;
uifc
.
input
(
WIN_MID
|
WIN_SAV
,
0
,
0
,
"Command"
,
cfg
.
fcomp
[
i
]
->
cmd
,
sizeof
(
cfg
.
fcomp
[
i
]
->
cmd
)
-
1
,
K_EDIT
);
...
...
@@ -986,26 +991,31 @@ void xfer_opts()
getar
(
str
,
cfg
.
prot
[
i
]
->
arstr
);
break
;
case
3
:
uifc
.
helpbuf
=
SCFG_CMDLINE_SPEC_HELP
;
uifc
.
input
(
WIN_MID
|
WIN_SAV
,
0
,
0
,
"Command"
,
cfg
.
prot
[
i
]
->
ulcmd
,
sizeof
(
cfg
.
prot
[
i
]
->
ulcmd
)
-
1
,
K_EDIT
);
break
;
case
4
:
uifc
.
helpbuf
=
SCFG_CMDLINE_SPEC_HELP
;
uifc
.
input
(
WIN_MID
|
WIN_SAV
,
0
,
0
,
"Command"
,
cfg
.
prot
[
i
]
->
dlcmd
,
sizeof
(
cfg
.
prot
[
i
]
->
dlcmd
)
-
1
,
K_EDIT
);
break
;
case
5
:
uifc
.
helpbuf
=
SCFG_CMDLINE_SPEC_HELP
;
uifc
.
input
(
WIN_MID
|
WIN_SAV
,
0
,
0
,
"Command"
,
cfg
.
prot
[
i
]
->
batulcmd
,
sizeof
(
cfg
.
prot
[
i
]
->
batulcmd
)
-
1
,
K_EDIT
);
break
;
case
6
:
uifc
.
helpbuf
=
SCFG_CMDLINE_SPEC_HELP
;
uifc
.
input
(
WIN_MID
|
WIN_SAV
,
0
,
0
,
"Command"
,
cfg
.
prot
[
i
]
->
batdlcmd
,
sizeof
(
cfg
.
prot
[
i
]
->
batdlcmd
)
-
1
,
K_EDIT
);
break
;
case
7
:
uifc
.
helpbuf
=
SCFG_CMDLINE_SPEC_HELP
;
uifc
.
input
(
WIN_MID
|
WIN_SAV
,
0
,
0
,
"Command"
,
cfg
.
prot
[
i
]
->
bicmd
,
sizeof
(
cfg
.
prot
[
i
]
->
bicmd
)
-
1
,
K_EDIT
);
...
...
src/sbbs3/scfg/scfgxtrn.c
View file @
34f21397
...
...
@@ -361,6 +361,7 @@ void fevents_cfg()
"in the logon sequence of users that includes interaction or requires
\n
"
"account information, you probably want to use an online external
\n
"
"program configured to run as a logon event.
\n
"
SCFG_CMDLINE_SPEC_HELP
;
uifc
.
input
(
WIN_MID
|
WIN_SAV
,
0
,
0
,
"Logon Event"
,
cfg
.
sys_logon
,
sizeof
(
cfg
.
sys_logon
)
-
1
,
K_EDIT
);
...
...
@@ -375,6 +376,7 @@ void fevents_cfg()
"wish to have a program execute before carrier is dropped, you probably
\n
"
"want to use an `Online External Program` configured to run as a logoff
\n
"
"event.
\n
"
SCFG_CMDLINE_SPEC_HELP
;
uifc
.
input
(
WIN_MID
|
WIN_SAV
,
0
,
0
,
"Logout Event"
,
cfg
.
sys_logout
,
sizeof
(
cfg
.
sys_logout
)
-
1
,
K_EDIT
);
...
...
@@ -385,6 +387,7 @@ void fevents_cfg()
"
\n
"
"This is the command line for a program that will run after the first
\n
"
"user that logs on after midnight, logs off (regardless of what node).
\n
"
SCFG_CMDLINE_SPEC_HELP
;
uifc
.
input
(
WIN_MID
|
WIN_SAV
,
0
,
0
,
"Daily Event"
,
cfg
.
sys_daily
,
sizeof
(
cfg
.
sys_daily
)
-
1
,
K_EDIT
);
...
...
@@ -510,10 +513,6 @@ void tevents_cfg()
"external program that performs some type of automated function on the
\n
"
"system. Use this menu to configure how and when this event will be
\n
"
"executed.
\n
"
"
\n
"
"If you need the BBS to swap out of memory for this event (to make more
\n
"
"available memory), add the program name (first word of the command line)
\n
"
"to `Global Swap List` from the `External Programs` menu.
\n
"
;
sprintf
(
str
,
"%s Timed Event"
,
cfg
.
event
[
i
]
->
code
);
switch
(
uifc
.
list
(
WIN_SAV
|
WIN_ACT
|
WIN_L2R
|
WIN_BOT
,
0
,
0
,
70
,
&
dfltopt
,
0
...
...
@@ -528,7 +527,7 @@ void tevents_cfg()
"
\n
"
"Every timed event must have its own unique internal code for Synchronet
\n
"
"to reference it by. It is helpful if this code is an abbreviation of the
\n
"
"command line.
\n
"
"command line
or program name
.
\n
"
;
uifc
.
input
(
WIN_MID
|
WIN_SAV
,
0
,
17
,
"Internal Code (unique)"
,
str
,
LEN_CODE
,
K_EDIT
|
K_UPPER
);
...
...
@@ -549,9 +548,6 @@ void tevents_cfg()
"before the event's command line is executed. This eliminates the need
\n
"
"for batch files that just change the current drive and directory before
\n
"
"executing the event.
\n
"
"
\n
"
"If this option is not used, the current NODE's directory will be the
\n
"
"current DOS drive/directory before the command line is executed.
\n
"
;
uifc
.
input
(
WIN_MID
|
WIN_SAV
,
0
,
10
,
"Directory"
,
cfg
.
event
[
i
]
->
dir
,
sizeof
(
cfg
.
event
[
i
]
->
dir
)
-
1
,
K_EDIT
);
...
...
@@ -561,6 +557,7 @@ void tevents_cfg()
"`Timed Event Command Line:`
\n
"
"
\n
"
"This is the command line to execute upon this timed event.
\n
"
SCFG_CMDLINE_SPEC_HELP
;
uifc
.
input
(
WIN_MID
|
WIN_SAV
,
0
,
10
,
"Command"
,
cfg
.
event
[
i
]
->
cmd
,
sizeof
(
cfg
.
event
[
i
]
->
cmd
)
-
1
,
K_EDIT
);
...
...
@@ -1068,9 +1065,6 @@ void xtrn_cfg(uint section)
"before the program's command line is executed. This eliminates the need
\n
"
"for batch files that just change the current drive and directory before
\n
"
"executing the program.
\n
"
"
\n
"
"If this option is not used, the current NODE's directory will be the
\n
"
"current DOS drive/directory before the command line is executed.
\n
"
;
uifc
.
input
(
WIN_MID
|
WIN_SAV
,
0
,
10
,
""
,
cfg
.
xtrn
[
i
]
->
path
,
sizeof
(
cfg
.
xtrn
[
i
]
->
path
)
-
1
,
K_EDIT
);
...
...
@@ -1080,6 +1074,7 @@ void xtrn_cfg(uint section)
"`Online Program Command Line:`
\n
"
"
\n
"
"This is the command line to execute to run the online program.
\n
"
SCFG_CMDLINE_SPEC_HELP
;
uifc
.
input
(
WIN_MID
|
WIN_SAV
,
0
,
10
,
"Command"
,
cfg
.
xtrn
[
i
]
->
cmd
,
sizeof
(
cfg
.
xtrn
[
i
]
->
cmd
)
-
1
,
K_EDIT
);
...
...
@@ -1090,6 +1085,7 @@ void xtrn_cfg(uint section)
"
\n
"
"This is the command line to execute after the main command line. This
\n
"
"option is usually only used for multiuser online programs.
\n
"
SCFG_CMDLINE_SPEC_HELP
;
uifc
.
input
(
WIN_MID
|
WIN_SAV
,
0
,
10
,
"Clean-up"
,
cfg
.
xtrn
[
i
]
->
clean
,
sizeof
(
cfg
.
xtrn
[
i
]
->
clean
)
-
1
,
K_EDIT
);
...
...
@@ -1702,6 +1698,7 @@ void xedit_cfg()
"`External Editor Command Line:`
\n
"
"
\n
"
"This is the command line to execute when using this editor.
\n
"
SCFG_CMDLINE_SPEC_HELP
;
uifc
.
input
(
WIN_MID
|
WIN_SAV
,
0
,
10
,
"Command"
,
cfg
.
xedit
[
i
]
->
rcmd
,
sizeof
(
cfg
.
xedit
[
i
]
->
rcmd
)
-
1
,
K_EDIT
);
...
...
@@ -2382,6 +2379,7 @@ void hotkey_cfg(void)
"`Hot Key Event Command Line:`
\n
"
"
\n
"
"This is the command line to execute when this hot key is pressed.
\n
"
SCFG_CMDLINE_SPEC_HELP
;
uifc
.
input
(
WIN_MID
|
WIN_SAV
,
0
,
10
,
"Command"
,
cfg
.
hotkey
[
i
]
->
cmd
,
sizeof
(
cfg
.
hotkey
[
i
]
->
cmd
)
-
1
,
K_EDIT
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment