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
e8aaecc6
Commit
e8aaecc6
authored
1 month ago
by
Rob Swindell
Browse files
Options
Downloads
Patches
Plain Diff
Beautify the "help" output
Both the and the output are not prettier. This fixes issue #901
parent
b55f8621
Branches
Branches containing commit
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
exec/str_cmds.js
+69
-164
69 additions, 164 deletions
exec/str_cmds.js
with
69 additions
and
164 deletions
exec/str_cmds.js
+
69
−
164
View file @
e8aaecc6
...
...
@@ -27,9 +27,6 @@ if(argc>0)
else
if
(
bbs
.
command_str
&&
bbs
.
command_str
!=
''
)
str_cmds
(
bbs
.
command_str
);
// otherwise, use command shell 'str' var, if supported (v3.13b)
// For testing...
//str_cmds(console.getstr("",60));
function
str_cmds
(
str
)
{
var
file
;
// File
...
...
@@ -41,6 +38,7 @@ function str_cmds(str)
var
m
;
// Temp integer
var
a
;
// Temp array
var
s
;
// Temp string
var
help
=
[];
// Command descriptions
// Remove any trailing spaces
...
...
@@ -57,8 +55,6 @@ function str_cmds(str)
return
;
log
(
"
Invoked string command:
"
+
str
);
bbs
.
log_str
(
str
);
if
(
str
==
"
HELP
"
)
write
(
"
\r\n
Available commands
\r\n\r\n
"
);
var
node_action
=
bbs
.
node_action
;
if
(
bbs
.
compare_ars
(
"
SYSOP
"
))
{
...
...
@@ -67,9 +63,7 @@ function str_cmds(str)
//sync
// ######################## SYSOP Functions ##############################
if
(
str
==
"
HELP
"
)
{
writeln
(
"
AVAIL
\t
Toggle sysop chat availability
"
);
}
help
[
"
AVAIL
"
]
=
"
Toggle sysop chat availability
"
;
if
(
str
==
"
AVAIL
"
)
{
system
.
operator_available
=
!
system
.
operator_available
;
write
(
format
(
bbs
.
text
(
text
.
LiSysopIs
)
...
...
@@ -77,10 +71,7 @@ function str_cmds(str)
return
;
}
if
(
str
==
"
HELP
"
)
{
writeln
(
"
ERR
\t
Display current error log and optionally delete it, as well as
"
);
writeln
(
"
\t
optionally clearing all nodes' error counters.
"
);
}
help
[
"
ERR
"
]
=
"
Display current error log and optionally delete it, as well as optionally clearing all nodes' error counters
"
;
if
(
str
==
"
ERR
"
)
{
var
errlog
=
system
.
logs_dir
+
"
error.log
"
;
if
(
file_exists
(
errlog
))
{
...
...
@@ -107,8 +98,7 @@ function str_cmds(str)
return
;
}
if
(
str
==
"
HELP
"
)
writeln
(
"
GURU
\t
Display and optionally clear current guru log.
"
);
help
[
"
GURU
"
]
=
"
Display and optionally clear current guru log
"
;
if
(
str
==
"
GURU
"
)
{
if
(
file_exists
(
system
.
logs_dir
+
"
guru.log
"
))
{
console
.
printfile
(
system
.
logs_dir
+
"
guru.log
"
);
...
...
@@ -118,18 +108,14 @@ function str_cmds(str)
}
}
if
(
str
==
"
HELP
"
)
writeln
(
"
CHUSER
\t
Become a different user.
"
);
help
[
"
CHUSER
"
]
=
"
Become a different user
"
;
if
(
str
==
"
CHUSER
"
)
{
// Prompts for syspass
bbs
.
change_user
();
return
;
}
if
(
str
==
"
HELP
"
)
{
writeln
(
"
TYPE [filename]
"
);
writeln
(
"
\t
Displays a file. Aliases: LIST and CAT
"
);
}
help
[
"
TYPE [filename]
"
]
=
"
Displays a file. Aliases: LIST and CAT
"
;
if
(
word
==
"
LIST
"
||
word
==
"
TYPE
"
||
word
==
"
CAT
"
)
{
if
(
bbs
.
check_syspass
())
{
str
=
str
.
substr
(
4
);
...
...
@@ -138,10 +124,7 @@ function str_cmds(str)
}
}
if
(
str
==
"
HELP
"
)
{
writeln
(
"
ECHO [string]
"
);
writeln
(
"
\t
Print a text message.
"
);
}
help
[
"
ECHO [string]
"
]
=
"
Print a text message
"
;
if
(
word
==
"
ECHO
"
)
{
if
(
bbs
.
check_syspass
())
{
str
=
str
.
substr
(
4
);
...
...
@@ -151,10 +134,7 @@ function str_cmds(str)
}
}
if
(
str
==
"
HELP
"
)
{
writeln
(
"
EVAL [string]
"
);
writeln
(
"
\t
Evaluate a JavaScript expression and display result.
"
);
}
help
[
"
EVAL [string]
"
]
=
"
Evaluate a JavaScript expression and display result
"
;
if
(
word
==
"
EVAL
"
)
{
if
(
bbs
.
check_syspass
())
{
str
=
str
.
substr
(
4
);
...
...
@@ -170,8 +150,7 @@ function str_cmds(str)
}
}
if
(
str
==
"
HELP
"
)
writeln
(
"
EDIT
\t
Edits a specified file using your message editor.
"
);
help
[
"
EDIT
"
]
=
"
Edits a specified file using your message editor
"
;
if
(
word
==
"
EDIT
"
)
{
if
(
bbs
.
check_syspass
())
{
str
=
str
.
substr
(
4
);
...
...
@@ -179,8 +158,7 @@ function str_cmds(str)
}
}
if
(
str
==
"
HELP
"
)
writeln
(
"
LOG
\t
Displays todays activity log
"
);
help
[
"
LOG
"
]
=
"
Displays todays activity log
"
;
if
(
str
==
"
LOG
"
)
{
if
(
bbs
.
check_syspass
())
{
str
=
system
.
logs_dir
+
strftime
(
"
logs/%m%d%y.log
"
,
time
());
...
...
@@ -189,8 +167,7 @@ function str_cmds(str)
return
;
}
if
(
str
==
"
HELP
"
)
writeln
(
"
YLOG
\t
Displays yesterdays activity log.
"
);
help
[
"
YLOG
"
]
=
"
Displays yesterdays activity log
"
;
if
(
str
==
"
YLOG
"
)
{
if
(
bbs
.
check_syspass
())
{
str
=
system
.
logs_dir
+
strftime
(
"
logs/%m%d%y.log
"
,
time
()
-
24
*
60
*
60
);
...
...
@@ -199,15 +176,13 @@ function str_cmds(str)
return
;
}
if
(
str
==
"
HELP
"
)
writeln
(
"
SS
\t
Displays current system stats
"
);
help
[
"
SS
"
]
=
"
Displays current system stats
"
;
if
(
str
==
"
SS
"
)
{
bbs
.
sys_stats
();
return
;
}
if
(
str
==
"
HELP
"
)
writeln
(
"
NS <#>
\t
Displays the current node stats for node #.
"
);
help
[
"
NS <#>
"
]
=
"
Displays the current node stats for node #
"
;
if
(
word
==
"
NS
"
)
{
str
=
str
.
substr
(
2
);
i
=
parseInt
(
get_nodenum
(
str
));
...
...
@@ -216,10 +191,7 @@ function str_cmds(str)
return
;
}
if
(
str
==
"
HELP
"
)
{
writeln
(
"
EXEC [command]
"
);
writeln
(
"
\t
executes command (or prompts for it) with I/O redirected.
"
);
}
help
[
"
EXEC [command]
"
]
=
"
Executes command (or prompts for it) with I/O redirected
"
;
if
(
word
==
"
EXEC
"
)
{
if
(
bbs
.
check_syspass
())
{
str
=
str
.
substr
(
4
);
...
...
@@ -234,11 +206,7 @@ function str_cmds(str)
return
;
}
if
(
str
==
"
HELP
"
)
{
writeln
(
"
NEXEC [command]
"
);
writeln
(
"
\t
executes command (or prompts for it) with I/O redirected, and assuming
"
);
writeln
(
"
\t
it's a native binary.
"
);
}
help
[
"
NEXEC [command]
"
]
=
"
Executes command (or prompts for it) with I/O redirected, and assuming it's a native binary
"
;
if
(
word
==
"
NEXEC
"
)
{
if
(
bbs
.
check_syspass
())
{
str
=
str
.
substr
(
5
);
...
...
@@ -249,11 +217,7 @@ function str_cmds(str)
return
;
}
if
(
str
==
"
HELP
"
)
{
writeln
(
"
FOSSIL [command]
"
);
writeln
(
"
\t
executes command (or prompts for it) with I/O redirected, and assuming
"
);
writeln
(
"
\t
the internal FOSSIL driver will be used.
"
);
}
help
[
"
FOSSIL [command]
"
]
=
"
Executes command (or prompts for it) with I/O redirected, and assuming the internal FOSSIL driver will be used
"
;
if
(
word
==
"
FOSSIL
"
)
{
if
(
bbs
.
check_syspass
())
{
str
=
str
.
substr
(
6
);
...
...
@@ -264,10 +228,7 @@ function str_cmds(str)
return
;
}
if
(
str
==
"
HELP
"
)
{
writeln
(
"
CALL <HubID>
"
);
writeln
(
"
\t
forces a callout to QWKnet HubID
"
);
}
help
[
"
CALL <HubID>
"
]
=
"
Forces a callout to QWKnet HubID
"
;
if
(
word
==
"
CALL
"
)
{
if
(
bbs
.
check_syspass
())
{
str
=
str
.
substr
(
4
);
...
...
@@ -278,10 +239,7 @@ function str_cmds(str)
return
;
}
if
(
str
==
"
HELP
"
)
{
writeln
(
"
EVENT [EventID]
"
);
writeln
(
"
\t
forces a timed-event to execute via semfile
"
);
}
help
[
"
EVENT [EventID]
"
]
=
"
Forces a timed-event to execute via semfile
"
;
if
(
word
==
"
EVENT
"
)
{
if
(
bbs
.
check_syspass
())
{
str
=
str
.
substr
(
5
);
...
...
@@ -307,19 +265,13 @@ function str_cmds(str)
}
if
(
str
==
"
HELP
"
)
{
writeln
(
"
NODE [parameters]
"
);
writeln
(
"
\t
executes the node utility with the passed parameters.
"
);
}
help
[
"
NODE [parameters]
"
]
=
"
Executes the node utility with the passed parameters
"
;
if
(
word
==
"
NODE
"
)
{
bbs
.
exec
(
bbs
.
cmdstr
(
"
%!node%. -pause
"
)
+
str
.
substr
(
4
),
EX_STDIO
|
EX_NATIVE
);
return
;
}
if
(
str
==
"
HELP
"
)
{
writeln
(
"
DOWN [#]
"
);
writeln
(
"
\t
downs node #. If # is omitted, downs the current node.
"
);
}
help
[
"
DOWN [#]
"
]
=
"
Downs node #. If # is omitted, downs the current node
"
;
if
(
word
==
"
DOWN
"
)
{
str
=
str
.
substr
(
4
);
i
=
parseInt
(
get_nodenum
(
str
));
...
...
@@ -337,10 +289,7 @@ function str_cmds(str)
return
;
}
if
(
str
==
"
HELP
"
)
{
writeln
(
"
RERUN [#]
"
);
writeln
(
"
\t
Marks node # for rerun. If # is omitted, reruns the current node.
"
);
}
help
[
"
RERUN [#]
"
]
=
"
Marks node # for rerun. If # is omitted, reruns the current node
"
;
if
(
word
==
"
RERUN
"
)
{
str
=
str
.
substr
(
5
);
i
=
parseInt
(
get_nodenum
(
str
));
...
...
@@ -355,25 +304,19 @@ function str_cmds(str)
return
;
}
if
(
str
==
"
HELP
"
)
writeln
(
"
RELOAD
\t
Reload the current shell (if JavaScript).
"
);
help
[
"
RELOAD
"
]
=
"
Reload the current shell (if JavaScript)
"
;
if
(
str
==
"
RELOAD
"
)
{
bbs
.
load_user_text
();
exit
(
0
);
}
if
(
str
==
"
HELP
"
)
writeln
(
"
SLOG
\t
Executes the slog utility to display system statistics.
"
);
help
[
"
SLOG
"
]
=
"
Executes the slog utility to display system statistics
"
;
if
(
str
==
"
SLOG
"
)
{
bbs
.
exec
(
bbs
.
cmdstr
(
"
%!slog%. /p
"
),
EX_STDIO
|
EX_NATIVE
);
return
;
}
if
(
str
==
"
HELP
"
)
{
writeln
(
"
NLOG [#]
"
);
writeln
(
"
\t
Executes the slog utility to display node stats for the specified node.
"
);
writeln
(
"
\t
If # is omitted, uses the current node.
"
);
}
help
[
"
NLOG [#]
"
]
=
"
Executes the slog utility to display node stats for the specified node. If # is omitted, uses the current node
"
;
if
(
str
==
"
NLOG
"
)
{
bbs
.
exec
(
bbs
.
cmdstr
(
"
%!slog%. %n /p
"
),
EX_STDIO
|
EX_NATIVE
);
return
;
...
...
@@ -384,10 +327,7 @@ function str_cmds(str)
return
;
}
if
(
str
==
"
HELP
"
)
{
writeln
(
"
UEDIT [Number or Name]
"
);
writeln
(
"
\t
Edits specified user or starts at user #1
"
);
}
help
[
"
UEDIT [Number or Name]
"
]
=
"
Edits specified user or starts at user #1
"
;
if
(
word
==
"
UEDIT
"
)
{
// Prompts for syspass
str
=
str
.
substr
(
5
).
trim
();
...
...
@@ -403,17 +343,13 @@ function str_cmds(str)
return
;
}
if
(
str
==
"
HELP
"
)
writeln
(
"
MAIL
\t
Read all mail currently in the mail base
"
);
help
[
"
MAIL
"
]
=
"
Read all mail currently in the mail base
"
;
if
(
str
==
"
MAIL
"
)
{
bbs
.
read_mail
(
MAIL_ALL
);
return
;
}
if
(
str
==
"
HELP
"
)
{
writeln
(
"
BULKMAIL
"
);
writeln
(
"
\t
Sends a mail to all users which match a specified ARS.
"
);
}
help
[
"
BULKMAIL
"
]
=
"
Sends a mail to all users which match a specified ARS
"
;
if
(
str
==
"
BULKMAIL
"
)
{
write
(
"
\r\n
Enter ARS matches to send mail to or [CR] to send
"
);
write
(
"
by name/number
\r\n
ARS to match:
"
);
...
...
@@ -423,9 +359,7 @@ function str_cmds(str)
return
;
}
if
(
str
==
"
HELP
"
)
{
writeln
(
"
DOS
\t
Executes the DOS shell (command.com) with I/O redirected.
"
);
}
help
[
"
DOS
"
]
=
"
Executes the DOS shell (command.com) with I/O redirected
"
;
if
(
str
==
"
DOS
"
)
{
// DOS/Windows shell
if
(
bbs
.
check_syspass
())
{
bbs
.
exec
(
"
command.com
"
,
EX_STDIO
);
...
...
@@ -433,8 +367,7 @@ function str_cmds(str)
return
;
}
if
(
str
==
"
HELP
"
)
writeln
(
"
SHELL
\t
Executes the native shell (COMSPEC or SHELL env variable).
"
);
help
[
"
SHELL
"
]
=
"
Executes the native shell (COMSPEC or SHELL env variable)
"
;
if
(
str
==
"
SHELL
"
)
{
// Unix shell (-i for interactive)
if
(
bbs
.
check_syspass
())
{
if
(
system
.
platform
!=
'
Win32
'
)
...
...
@@ -445,10 +378,7 @@ function str_cmds(str)
return
;
}
if
(
str
==
"
HELP
"
)
{
writeln
(
"
SPY <#>
"
);
writeln
(
"
\t
Spys on node #.
"
);
}
help
[
"
SPY <#>
"
]
=
"
Spys on node #
"
;
if
(
word
==
"
SPY
"
)
{
if
(
bbs
.
check_syspass
())
{
str
=
str
.
substr
(
3
);
...
...
@@ -465,21 +395,14 @@ function str_cmds(str)
return
;
}
if
(
str
==
"
HELP
"
)
{
writeln
(
"
LOAD [filespec]
"
);
writeln
(
"
\t
Loads the text.dat from the specified filespec.
"
);
}
help
[
"
LOAD [filespec]
"
]
=
"
Loads the text.dat from the specified filespec
"
;
if
(
word
==
"
LOAD
"
)
{
str
=
str
.
substr
(
4
);
bbs
.
load_text
(
get_filename
(
str
));
return
;
}
if
(
str
==
"
HELP
"
)
{
writeln
(
"
DIR [path]
"
);
writeln
(
"
\t
Displays a full directory of specified path or the current file area if
"
);
writeln
(
"
\t
not specified
"
);
}
help
[
"
DIR [path]
"
]
=
"
Displays a full directory of specified path or the current file area if not specified
"
;
if
(
str
==
"
DIR
"
&&
node_action
==
NODE_XFER
)
{
// Dir of current lib:
if
(
bbs
.
check_syspass
())
{
...
...
@@ -553,14 +476,10 @@ function str_cmds(str)
if
(
node_action
==
NODE_XFER
)
{
if
(
str
==
"
HELP
"
)
{
writeln
(
"
UPLOAD [areaspec]
"
);
writeln
(
"
\t
Performs a bulk upload in areaspec where area spec is ALL, LIB, or
"
);
writeln
(
"
\t
omitted.
"
);
writeln
(
"
\t
If areaspec is ALL performs the bulk upload in all file areas.
"
);
writeln
(
"
\t
If areaspec is LIB, does the same in all areas of the current lib.
"
);
}
help
[
"
UPLOAD [areaspec]
"
]
=
"
Performs a bulk upload in areaspec where area spec is ALL, LIB, or omitted.
"
+
"
If areaspec is ALL performs the bulk upload in all file areas.
"
+
"
If areaspec is LIB, does the same in all areas of the current lib
"
;
if
(
word
==
"
UPLOAD
"
)
{
str
=
str
.
substr
(
7
);
if
(
str
.
toUpperCase
()
==
"
ALL
"
)
{
...
...
@@ -591,14 +510,9 @@ function str_cmds(str)
return
;
}
if
(
str
==
"
HELP
"
)
{
writeln
(
"
OLDUL [ALL|LIB|blank]
"
);
writeln
(
"
\t
Lists all files uploaded before your last scan time.
"
);
writeln
(
"
OLD [ALL|LIB|blank]
"
);
writeln
(
"
\t
Lists all files not downloaded since your last scan time.
"
);
writeln
(
"
OFFLINE [ALL|LIB|blank]
"
);
writeln
(
"
\t
Lists all offline files.
"
);
}
help
[
"
OLDUL [ALL|LIB|blank]
"
]
=
"
Lists all files uploaded before your last scan time
"
;
help
[
"
OLD [ALL|LIB|blank]
"
]
=
"
Lists all files not downloaded since your last scan time
"
;
help
[
"
OFFLINE [ALL|LIB|blank]
"
]
=
"
Lists all offline files
"
;
if
(
word
==
"
OLDUL
"
||
word
==
"
OLD
"
||
word
==
"
OFFLINE
"
)
{
str
=
str
.
replace
(
/^
[
A-Z
]
*
\s
/
,
""
);
if
(
file_area
.
lib_list
.
length
<
1
)
...
...
@@ -667,10 +581,7 @@ function str_cmds(str)
}
}
if
(
str
==
"
HELP
"
)
{
writeln
(
"
GET [path]
"
);
writeln
(
"
\t
Download the specified file
"
);
}
help
[
"
GET [path]
"
]
=
"
Download the specified file
"
;
if
(
word
==
"
GET
"
)
{
str
=
str
.
substr
(
3
);
str
=
str
.
replace
(
/^
\s
+/
,
""
);
...
...
@@ -691,10 +602,7 @@ function str_cmds(str)
return
;
}
if
(
str
==
"
HELP
"
)
{
writeln
(
"
PUT [path]
"
);
writeln
(
"
\t
Upload the specified file
"
);
}
help
[
"
PUT [path]
"
]
=
"
Upload the specified file
"
;
if
(
word
==
"
PUT
"
)
{
str
=
str
.
substr
(
3
);
str
=
str
.
replace
(
/^
\s
+/
,
""
);
...
...
@@ -717,8 +625,7 @@ function str_cmds(str)
//# Quiet Node
if
(
user
.
compare_ars
(
"
exempt Q
"
))
{
if
(
str
==
"
HELP
"
)
writeln
(
"
QUIET
\t
Toggles quiet setting (you are not listed as online).
"
);
help
[
"
QUIET
"
]
=
"
Toggles quiet setting (you are not listed as online)
"
;
if
(
str
==
"
QUIET
"
)
{
if
(
system
.
node_list
[
bbs
.
node_num
-
1
].
status
==
NODE_QUIET
)
system
.
node_list
[
bbs
.
node_num
-
1
].
status
=
NODE_INUSE
;
...
...
@@ -728,10 +635,7 @@ function str_cmds(str)
return
;
}
if
(
str
==
"
HELP
"
)
{
writeln
(
"
ANON
\t
Toggles anonymous setting (the node is listed online, but you are not
"
);
writeln
(
"
\t
mentioned).
"
);
}
help
[
"
ANON
"
]
=
"
Toggles anonymous setting (the node is listed online, but you are not mentioned)
"
;
if
(
str
==
"
ANON
"
)
{
system
.
node_list
[
bbs
.
node_num
-
1
].
misc
^=
NODE_ANON
;
display_node
(
bbs
.
node_num
);
...
...
@@ -741,10 +645,7 @@ function str_cmds(str)
// Lock Node
if
(
user
.
compare_ars
(
"
exempt N
"
))
{
if
(
str
==
"
HELP
"
)
{
writeln
(
"
LOCK [#]
"
);
writeln
(
"
\t
Locks the specified node, or the current node if none specified.
"
);
}
help
[
"
LOCK [#]
"
]
=
"
Locks the specified node, or the current node if none specified
"
;
if
(
word
==
"
LOCK
"
)
{
str
=
str
.
substr
(
4
);
i
=
parseInt
(
get_nodenum
(
str
));
...
...
@@ -762,10 +663,7 @@ function str_cmds(str)
// Interrupt Node
if
(
user
.
compare_ars
(
"
exempt I
"
))
{
if
(
str
==
"
HELP
"
)
{
writeln
(
"
INTR [#]
"
);
writeln
(
"
\t
Interrupts the specified node, or the current node if none specified.
"
);
}
help
[
"
INTR [#]
"
]
=
"
Interrupts the specified node, or the current node if none specified
"
;
if
(
word
==
"
INTR
"
)
{
str
=
str
.
substr
(
4
);
i
=
parseInt
(
get_nodenum
(
str
));
...
...
@@ -783,16 +681,14 @@ function str_cmds(str)
// Chat
if
(
user
.
compare_ars
(
"
exempt C
"
))
{
if
(
str
==
"
HELP
"
)
writeln
(
"
CHAT
\t
Pages the sysop
"
);
help
[
"
CHAT
"
]
=
"
Pages the sysop
"
;
if
(
str
==
"
CHAT
"
)
{
bbs
.
page_sysop
();
return
;
}
}
if
(
str
==
"
HELP
"
)
writeln
(
"
POFF
\t
Toggles if other users can page you for this session.
"
);
help
[
"
POFF
"
]
=
"
Toggles if other users can page you for this session
"
;
if
(
str
==
"
POFF
"
)
{
system
.
node_list
[
bbs
.
node_num
-
1
].
misc
^=
NODE_POFF
;
write
(
"
Paging is
"
);
...
...
@@ -804,8 +700,7 @@ function str_cmds(str)
// Edit .plan
if
(
user
.
compare_ars
(
"
rest not G
"
))
{
if
(
str
==
"
HELP
"
)
writeln
(
"
PLAN
\t
Edits or deletes your .plan file (displayed when somebody fingers you).
"
);
help
[
"
PLAN
"
]
=
"
Edits or deletes your .plan file (displayed when somebody fingers you)
"
;
if
(
str
==
"
PLAN
"
)
{
var
plan
=
format
(
"
%suser/%04d.plan
"
,
system
.
data_dir
,
user
.
number
);
if
(
file_exists
(
plan
))
{
...
...
@@ -821,10 +716,8 @@ function str_cmds(str)
}
}
if
(
str
==
"
HELP
"
)
{
writeln
(
"
SIG
\t
Edit or delete your default message signature.
"
);
writeln
(
"
SUBSIG
\t
Edit or delete your signature for this sub-board (over-rides default).
"
);
}
help
[
"
SIG
"
]
=
"
Edit or delete your default message signature
"
;
help
[
"
SUBSIG
"
]
=
"
Edit or delete your signature for this sub-board (over-rides default)
"
;
if
(
str
==
"
SIG
"
||
str
==
"
SUBSIG
"
)
{
var
userSigFilename
=
system
.
data_dir
+
"
user/
"
+
format
(
"
%04u
"
,
user
.
number
);
if
(
str
==
"
SUBSIG
"
)
...
...
@@ -845,10 +738,7 @@ function str_cmds(str)
}
}
if
(
str
==
"
HELP
"
)
{
writeln
(
"
FIND [word]
"
);
writeln
(
"
\t
Find a message area or file area.
"
);
}
help
[
"
FIND [word]
"
]
=
"
Find a message area or file area
"
;
if
(
word
==
"
FIND
"
&&
node_action
==
NODE_MAIN
)
{
str
=
get_arg
(
str
.
substr
(
4
).
trim
(),
"
Find
"
).
toLowerCase
();
if
(
!
str
)
...
...
@@ -885,12 +775,27 @@ function str_cmds(str)
}
}
}
if
(
str
==
"
HELP
"
)
{
writeln
(
"
MSGS
\t
Redisplay instant messages (notifications and telegrams).
"
);
}
help
[
"
MSGS
"
]
=
"
Redisplay instant messages (notifications and telegrams)
"
;
if
(
word
==
"
MSGS
"
)
{
load
({},
'
viewimsgs.js
'
);
}
if
(
str
==
"
HELP
"
)
{
write
(
"
\r\n\
x01y
\
x01hAvailable commands
\
x01n
\r\n\r\n
"
);
for
(
var
i
in
help
)
print_help
(
i
,
help
[
i
]);
}
else
if
(
word
==
"
HELP
"
)
{
var
cmd
=
str
.
substr
(
4
).
trim
().
toUpperCase
();
if
(
!
help
[
cmd
])
alert
(
"
Unrecognized command:
"
+
cmd
);
else
print_help
(
cmd
,
help
[
cmd
]);
}
}
function
print_help
(
cmd
,
desc
)
{
console
.
print
(
format
(
"
\
x01h%-18s
\
x01n
"
,
cmd
));
console
.
putmsg
(
word_wrap
(
desc
,
console
.
screen_columns
-
21
),
P_INDENT
);
}
//### Generic routine to ask user for parameter if one wasn't specified ###
...
...
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