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
b8d1300d
Commit
b8d1300d
authored
10 years ago
by
echicken
Browse files
Options
Downloads
Patches
Plain Diff
Comments, use text.js vars instead of numbers.
parent
6dd4129a
Branches
Branches containing commit
Tags
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
exec/load/menu-command-helpers.js
+18
-15
18 additions, 15 deletions
exec/load/menu-command-helpers.js
exec/load/menu-commands.js
+2
-0
2 additions, 0 deletions
exec/load/menu-commands.js
with
20 additions
and
15 deletions
exec/load/menu-command-helpers.js
+
18
−
15
View file @
b8d1300d
// Useful functions to call from command shells
load
(
"
sbbsdefs.js
"
);
load
(
"
sbbsdefs.js
"
);
load
(
"
text.js
"
);
// To-do:
// To-do:
// findFiles Prompt for filespec/search string bbs.list_files(filespec or string, FL_FINDDESC|FL_VIEW)
// findFiles Prompt for filespec/search string bbs.list_files(filespec or string, FL_FINDDESC|FL_VIEW)
...
@@ -7,11 +10,11 @@ load("sbbsdefs.js");
...
@@ -7,11 +10,11 @@ load("sbbsdefs.js");
// I'm not sure about the handling of bbs.curgrp vs. msg_area.grp_list index here
// I'm not sure about the handling of bbs.curgrp vs. msg_area.grp_list index here
var
selectMessageGroup
=
function
()
{
var
selectMessageGroup
=
function
()
{
console
.
putmsg
(
bbs
.
text
(
133
));
console
.
putmsg
(
bbs
.
text
(
CfgGrpLstHdr
));
for
(
var
g
=
0
;
g
<
msg_area
.
grp_list
.
length
;
g
++
)
{
for
(
var
g
=
0
;
g
<
msg_area
.
grp_list
.
length
;
g
++
)
{
console
.
putmsg
(
console
.
putmsg
(
format
(
format
(
((
g
==
bbs
.
curgrp
)
?
"
*
"
:
"
"
)
+
bbs
.
text
(
134
),
((
g
==
bbs
.
curgrp
)
?
"
*
"
:
"
"
)
+
bbs
.
text
(
CfgGrpLstFmt
),
g
+
1
,
g
+
1
,
msg_area
.
grp_list
[
g
].
description
msg_area
.
grp_list
[
g
].
description
)
)
...
@@ -19,7 +22,7 @@ var selectMessageGroup = function() {
...
@@ -19,7 +22,7 @@ var selectMessageGroup = function() {
}
}
console
.
mnemonics
(
console
.
mnemonics
(
format
(
format
(
bbs
.
text
(
503
),
bbs
.
text
(
JoinWhichGrp
),
bbs
.
curgrp
+
1
bbs
.
curgrp
+
1
)
)
);
);
...
@@ -32,7 +35,7 @@ var selectMessageGroup = function() {
...
@@ -32,7 +35,7 @@ var selectMessageGroup = function() {
// Not sure about the handling of bbs.cursb vs sub_list index here
// Not sure about the handling of bbs.cursb vs sub_list index here
var
selectMessageArea
=
function
()
{
var
selectMessageArea
=
function
()
{
console
.
putmsg
(
format
(
bbs
.
text
(
125
),
msg_area
.
sub
[
bbs
.
cursub_code
].
grp_name
));
console
.
putmsg
(
format
(
bbs
.
text
(
SubLstHdr
),
msg_area
.
sub
[
bbs
.
cursub_code
].
grp_name
));
for
(
var
s
=
0
;
s
<
msg_area
.
grp_list
[
bbs
.
curgrp
].
sub_list
.
length
;
s
++
)
{
for
(
var
s
=
0
;
s
<
msg_area
.
grp_list
[
bbs
.
curgrp
].
sub_list
.
length
;
s
++
)
{
var
mb
=
new
MsgBase
(
msg_area
.
grp_list
[
bbs
.
curgrp
].
sub_list
[
s
].
code
);
var
mb
=
new
MsgBase
(
msg_area
.
grp_list
[
bbs
.
curgrp
].
sub_list
[
s
].
code
);
mb
.
open
();
mb
.
open
();
...
@@ -40,7 +43,7 @@ var selectMessageArea = function() {
...
@@ -40,7 +43,7 @@ var selectMessageArea = function() {
mb
.
close
();
mb
.
close
();
console
.
putmsg
(
console
.
putmsg
(
format
(
format
(
((
s
==
bbs
.
cursub
)
?
"
*
"
:
"
"
)
+
bbs
.
text
(
126
),
((
s
==
bbs
.
cursub
)
?
"
*
"
:
"
"
)
+
bbs
.
text
(
SubLstFmt
),
s
+
1
,
s
+
1
,
msg_area
.
grp_list
[
bbs
.
curgrp
].
sub_list
[
s
].
description
,
msg_area
.
grp_list
[
bbs
.
curgrp
].
sub_list
[
s
].
description
,
""
,
""
,
...
@@ -50,7 +53,7 @@ var selectMessageArea = function() {
...
@@ -50,7 +53,7 @@ var selectMessageArea = function() {
}
}
console
.
mnemonics
(
console
.
mnemonics
(
format
(
format
(
bbs
.
text
(
503
),
bbs
.
text
(
JoinWhichSub
),
bbs
.
cursub
+
1
bbs
.
cursub
+
1
)
)
);
);
...
@@ -67,7 +70,7 @@ var selectGroupAndArea = function() {
...
@@ -67,7 +70,7 @@ var selectGroupAndArea = function() {
var
scanSubs
=
function
()
{
var
scanSubs
=
function
()
{
console
.
putmsg
(
bbs
.
text
(
116
));
console
.
putmsg
(
bbs
.
text
(
MessageScan
));
console
.
crlf
();
console
.
crlf
();
var
youOnly
=
(
console
.
noyes
(
"
To you only
"
))
?
0
:
SCAN_TOYOU
;
var
youOnly
=
(
console
.
noyes
(
"
To you only
"
))
?
0
:
SCAN_TOYOU
;
bbs
.
scan_subs
(
SCAN_NEW
|
youOnly
);
bbs
.
scan_subs
(
SCAN_NEW
|
youOnly
);
...
@@ -76,14 +79,14 @@ var scanSubs = function() {
...
@@ -76,14 +79,14 @@ var scanSubs = function() {
var
sendMail
=
function
()
{
var
sendMail
=
function
()
{
console
.
putmsg
(
bbs
.
text
(
10
));
console
.
putmsg
(
bbs
.
text
(
Email
));
console
.
crlf
();
console
.
crlf
();
var
nameOrNumber
=
console
.
getstr
(
""
,
30
,
K_EDIT
|
K_LINE
);
var
nameOrNumber
=
console
.
getstr
(
""
,
30
,
K_EDIT
|
K_LINE
);
if
(
isNaN
(
parseInt
(
nameOrNumber
)))
if
(
isNaN
(
parseInt
(
nameOrNumber
)))
nameOrNumber
=
system
.
matchuser
(
nameOrNumber
);
nameOrNumber
=
system
.
matchuser
(
nameOrNumber
);
if
(
nameOrNumber
<
1
)
{
if
(
nameOrNumber
<
1
)
{
console
.
crlf
();
console
.
crlf
();
console
.
putmsg
(
bbs
.
text
(
30
));
console
.
putmsg
(
bbs
.
text
(
Aborted
));
return
;
return
;
}
}
bbs
.
email
(
nameOrNumber
,
WM_EMAIL
);
bbs
.
email
(
nameOrNumber
,
WM_EMAIL
);
...
@@ -130,9 +133,9 @@ var findMessages = function() {
...
@@ -130,9 +133,9 @@ var findMessages = function() {
}
}
var
main
=
function
()
{
var
main
=
function
()
{
console
.
mnemonics
(
bbs
.
text
(
621
));
console
.
mnemonics
(
bbs
.
text
(
SubGroupOrAll
));
var
sga
=
console
.
getkeys
(
"
SGA
"
);
var
sga
=
console
.
getkeys
(
"
SGA
"
);
console
.
putmsg
(
bbs
.
text
(
76
));
console
.
putmsg
(
bbs
.
text
(
SearchStringPrompt
));
console
.
crlf
();
console
.
crlf
();
text
=
console
.
getstr
(
text
=
console
.
getstr
(
""
,
""
,
...
@@ -142,7 +145,7 @@ var findMessages = function() {
...
@@ -142,7 +145,7 @@ var findMessages = function() {
if
(
text
==
""
)
if
(
text
==
""
)
return
false
;
return
false
;
console
.
crlf
();
console
.
crlf
();
subjectsOnly
=
console
.
yesno
(
bbs
.
text
(
625
));
subjectsOnly
=
console
.
yesno
(
bbs
.
text
(
DisplaySubjectsOnlyQ
));
var
ret
=
true
;
var
ret
=
true
;
switch
(
sga
)
{
switch
(
sga
)
{
case
"
S
"
:
case
"
S
"
:
...
@@ -162,8 +165,8 @@ var findMessages = function() {
...
@@ -162,8 +165,8 @@ var findMessages = function() {
var
complete
=
function
(
ret
)
{
var
complete
=
function
(
ret
)
{
console
.
putmsg
(
console
.
putmsg
(
bbs
.
text
(
116
)
+
bbs
.
text
(
MessageScan
)
+
((
ret
)
?
format
(
bbs
.
text
(
117
),
subs
)
:
bbs
.
text
(
118
))
((
ret
)
?
format
(
bbs
.
text
(
MessageScanComplete
),
subs
)
:
bbs
.
text
(
MessageScanAborted
))
);
);
console
.
pause
();
console
.
pause
();
}
}
...
@@ -181,7 +184,7 @@ var findUser = function() {
...
@@ -181,7 +184,7 @@ var findUser = function() {
console
.
crlf
();
console
.
crlf
();
var
name
=
console
.
getstr
(
""
,
30
,
K_EDIT
|
K_LINE
);
var
name
=
console
.
getstr
(
""
,
30
,
K_EDIT
|
K_LINE
);
if
(
name
==
""
)
{
if
(
name
==
""
)
{
console
.
putmsg
(
bbs
.
text
(
30
));
console
.
putmsg
(
bbs
.
text
(
Aborted
));
return
;
return
;
}
}
bbs
.
finduser
(
name
);
bbs
.
finduser
(
name
);
...
...
This diff is collapsed.
Click to expand it.
exec/load/menu-commands.js
+
2
−
0
View file @
b8d1300d
// Mapping of menuedit/menushell 'commands' to built-in or helper functions
var
inBBS
=
function
()
{
var
inBBS
=
function
()
{
return
(
typeof
js
.
global
.
bbs
==
"
undefined
"
)
?
false
:
true
;
return
(
typeof
js
.
global
.
bbs
==
"
undefined
"
)
?
false
:
true
;
}
}
...
...
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