Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Synchronet
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
142
Issues
142
List
Boards
Labels
Service Desk
Milestones
Merge Requests
3
Merge Requests
3
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Metrics
Environments
Packages & Registries
Packages & Registries
Package Registry
Container Registry
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Main
Synchronet
Commits
511f43e6
Commit
511f43e6
authored
Oct 20, 2020
by
Rob Swindell
Browse files
Options
Browse Files
Download
Plain Diff
Merge remote-tracking branch 'origin/master'
parents
1161e2cf
c9ec5932
Pipeline
#382
canceled with stage
Changes
7
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
113 additions
and
18 deletions
+113
-18
ctrl/services.ini
ctrl/services.ini
+6
-0
exec/lbshell.js
exec/lbshell.js
+20
-6
exec/load/frame.js
exec/load/frame.js
+73
-9
exec/load/rss-atom.js
exec/load/rss-atom.js
+10
-2
src/sbbs3/websrvr.c
src/sbbs3/websrvr.c
+2
-0
webv4/pages/003-games.xjs
webv4/pages/003-games.xjs
+1
-1
xtrn/bullshit/bullshit.js
xtrn/bullshit/bullshit.js
+1
-0
No files found.
ctrl/services.ini
View file @
511f43e6
...
...
@@ -145,3 +145,9 @@ Command=websocketservice.js
Port
=
11235
Options
=
NO_HOST_LOOKUP|TLS
Command
=
websocketservice.js
; this implementation is known to have problems. use at your own risk
[IMAP]
Port
=
143
Command
=
imapservice.js
Enabled
=
false
exec/lbshell.js
View file @
511f43e6
...
...
@@ -153,13 +153,13 @@ function message_callback()
rows
=
get_message
();
if
(
rows
>
0
)
{
display
=
true
;
/*
/*
* ToDo: This currently assumes that the
* current menu is the only one protruding into the message window
* This would not be correct with (for example) 20 external areas
* and 20 externals in one area
*/
/* Create new timeout object. */
if
(
rows
>
console
.
screen_rows
-
1
)
rows
=
console
.
screen_rows
-
1
;
...
...
@@ -345,8 +345,8 @@ function Filemenu()
// Disabled if you can't upload or download.
// Disabled if no upload dir and no batch queue
,(
bbs
.
compare_ars
(
"
REST U AND REST D
"
))
||
(
bbs
.
batch_upload_total
<=
0
&&
bbs
.
batch_dnload_total
<=
0
||
(
bbs
.
batch_upload_total
<=
0
&&
bbs
.
batch_dnload_total
<=
0
&&
file_area
.
upload_dir
==
undefined
)
);
...
...
@@ -498,8 +498,18 @@ function Xtrnsecs()
if
(
xtrnsecwidth
>
37
)
xtrnsecwidth
=
37
;
this
.
add
(
"
\
xda
"
+
bars80
.
substr
(
0
,
xtrnsecwidth
)
+
"
\
xbf
"
,
undefined
,
undefined
,
""
,
""
);
for
(
j
=
0
;
j
<
xtrn_area
.
sec_list
.
length
;
j
++
)
this
.
add
(
"
< |
"
+
hotkeys
.
substr
(
j
,
1
)
+
"
"
+
xtrn_area
.
sec_list
[
j
].
name
,
j
.
toString
(),
xtrnsecwidth
);
for
(
j
=
0
;
j
<
xtrn_area
.
sec_list
.
length
;
j
++
)
{
// see if at least one program is available
var
canaccess
=
false
;
for
(
var
k
in
xtrn_area
.
sec_list
[
j
].
prog_list
)
{
if
(
xtrn_area
.
sec_list
[
j
].
prog_list
[
k
].
can_access
)
{
canaccess
=
true
;
}
}
if
(
canaccess
)
{
this
.
add
(
"
< |
"
+
hotkeys
.
substr
(
j
,
1
)
+
"
"
+
xtrn_area
.
sec_list
[
j
].
name
,
j
.
toString
(),
xtrnsecwidth
);
}
}
this
.
add
(
"
\
xc0
"
+
bars80
.
substr
(
0
,
xtrnsecwidth
)
+
"
\
xd9
"
,
undefined
,
undefined
,
""
,
""
);
}
Xtrnsecs
.
prototype
=
ShellLB
.
prototype
;
...
...
@@ -705,6 +715,10 @@ while(bbs.online) {
console
.
writeln
(
"
DOORSCAN ERROR:
"
+
e
);
log
(
"
Error running
"
+
xtrn_area
.
sec_list
[
curr_xtrnsec
].
prog_list
[
parseInt
(
x_prog
)].
code
+
"
"
+
e
);
}
if
(
xtrn_area
.
sec_list
[
curr_xtrnsec
].
prog_list
[
parseInt
(
x_prog
)].
settings
&
XTRN_PAUSE
)
{
console
.
pause
();
}
}
else
{
bbs
.
exec_xtrn
(
xtrn_area
.
sec_list
[
curr_xtrnsec
].
prog_list
[
parseInt
(
x_prog
)].
number
);
...
...
exec/load/frame.js
View file @
511f43e6
...
...
@@ -348,6 +348,15 @@ Frame.prototype.__defineSetter__("h_scroll", function(bool) {
Frame
.
prototype
.
__defineGetter__
(
"
is_open
"
,
function
()
{
return
this
.
__properties__
.
open
;
});
Frame
.
prototype
.
__defineGetter__
(
"
atcodes
"
,
function
()
{
return
this
.
__settings__
.
atcodes
;
});
Frame
.
prototype
.
__defineSetter__
(
"
atcodes
"
,
function
(
bool
)
{
if
(
typeof
bool
==
"
boolean
"
)
this
.
__settings__
.
atcodes
=
bool
;
else
throw
(
"
non-boolean atcode:
"
+
bool
);
});
/* public methods */
Frame
.
prototype
.
getData
=
function
(
x
,
y
,
use_offset
)
{
...
...
@@ -604,13 +613,7 @@ Frame.prototype.load = function(filename,width,height) {
while
(
lines
.
length
>
0
)
{
var
x
=
0
;
var
line
=
lines
.
shift
();
/* parse 'ATCODES'??
line = line.replace(/@(.*)@/g,
function (str, code, offset, s) {
return bbs.atcode(code);
}
);
*/
while
(
line
.
length
>
0
)
{
/* parse an attribute sequence*/
var
m
=
line
.
match
(
/^
\x
1b
\[(\d
*
)
;
?(\d
*
)
;
?(\d
*
)
m/
);
...
...
@@ -961,8 +964,8 @@ Frame.prototype.erase = function(ch, attr) {
if
(
!
this
.
__properties__
.
data
[
py
+
y
][
px
+
x
])
{
continue
;
}
if
((
this
.
__properties__
.
data
[
py
+
y
][
px
+
x
].
ch
===
undefined
||
this
.
__properties__
.
data
[
py
+
y
][
px
+
x
].
ch
===
ch
)
&&
if
((
this
.
__properties__
.
data
[
py
+
y
][
px
+
x
].
ch
===
undefined
||
this
.
__properties__
.
data
[
py
+
y
][
px
+
x
].
ch
===
ch
)
&&
this
.
__properties__
.
data
[
py
+
y
][
px
+
x
].
attr
==
attr
)
{
continue
;
}
...
...
@@ -1006,17 +1009,73 @@ Frame.prototype.cleartoeol = function(attr) {
}
}
}
Frame
.
prototype
.
crlf
=
function
()
{
this
.
__position__
.
cursor
.
x
=
0
;
if
(
this
.
__position__
.
cursor
.
y
<
this
.
height
-
1
)
this
.
__position__
.
cursor
.
y
+=
1
;
else
{}
}
Frame
.
prototype
.
__parseAtCodes__
=
function
(
str
)
{
return
str
.
replace
(
/
(?:
@
(
.+
?)
@
)
/g
,
function
(
match
,
code
,
rinput
)
{
// Don't allow ATCODES incompatible with the Frame system (things that take over the cursor,
// mess up the output, etc.) or atcodes that will require special support (which can be added later)
switch
(
code
)
{
case
'
CLS
'
:
case
'
CLEAR
'
:
case
'
PAUSE
'
:
case
'
EOF
'
:
case
'
PON
'
:
case
'
POFF
'
:
case
'
RESETPAUSE
'
:
case
'
HOME
'
:
case
'
CLRLINE
'
:
case
'
CLR2EOL
'
:
case
'
CLR2EOS
'
:
case
'
PUSHXY
'
:
case
'
POPXY
'
:
case
'
HANGUP
'
:
case
'
WORDWRAP
'
:
case
'
WRAPOFF
'
:
case
'
CENTER
'
:
return
''
;
case
'
SYSONLY
'
:
return
'
@SYSONLY@
'
;
// make it obvious this doesn't work
}
if
(
code
.
indexOf
(
'
DELAY:
'
)
==
0
)
return
;
if
(
code
.
indexOf
(
'
UP:
'
)
==
0
)
return
;
if
(
code
.
indexOf
(
'
DOWN:
'
)
==
0
)
return
;
if
(
code
.
indexOf
(
'
LEFT:
'
)
==
0
)
return
;
if
(
code
.
indexOf
(
'
RIGHT:
'
)
==
0
)
return
;
if
(
code
.
indexOf
(
'
GOTOXY:
'
)
==
0
)
return
;
if
(
code
.
indexOf
(
'
POS:x
'
)
==
0
)
return
;
if
(
code
.
indexOf
(
'
MENU:
'
)
==
0
)
return
;
if
(
code
.
indexOf
(
'
CONDMENU:
'
)
==
0
)
return
;
if
(
code
.
indexOf
(
'
TYPE:
'
)
==
0
)
return
;
if
(
code
.
indexOf
(
'
INCLUDE:
'
)
==
0
)
return
;
if
(
code
.
indexOf
(
'
EXEC:
'
)
==
0
)
return
;
if
(
code
.
indexOf
(
'
EXEC_XTRN:
'
)
==
0
)
return
;
if
(
code
.
indexOf
(
'
JS:
'
)
==
0
)
return
;
if
(
code
.
indexOf
(
'
FILL:
'
)
==
0
)
return
;
if
(
code
.
indexOf
(
'
WIDE:
'
)
==
0
)
return
;
// parse remaining valid codes
return
bbs
.
atcode
(
code
);
});
}
Frame
.
prototype
.
write
=
function
(
str
,
attr
)
{
if
(
str
==
undefined
)
return
;
if
(
this
.
__settings__
.
word_wrap
)
str
=
word_wrap
(
str
,
this
.
width
,
str
.
length
,
false
);
if
(
this
.
__settings__
.
atcodes
)
{
str
=
this
.
__parseAtCodes__
(
str
);
}
str
=
str
.
toString
().
split
(
''
);
if
(
attr
)
...
...
@@ -1042,6 +1101,11 @@ Frame.prototype.putmsg = function(str,attr) {
if
(
!
trailing_newline
)
str
=
str
.
trimRight
();
}
}
if
(
this
.
__settings__
.
atcodes
)
{
str
=
this
.
__parseAtCodes__
(
str
);
}
str
=
str
.
toString
().
split
(
''
);
if
(
attr
)
...
...
exec/load/rss-atom.js
View file @
511f43e6
...
...
@@ -155,6 +155,14 @@ const Channel = function (c) {
}
function
toLocal
(
x
)
{
for
each
(
var
e
in
x
)
{
e
.
setName
(
e
.
localName
());
toLocal
(
e
);
}
return
x
;
}
const
Feed
=
function
(
url
,
follow_redirects
)
{
this
.
channels
=
[];
...
...
@@ -176,8 +184,8 @@ const Feed = function (url, follow_redirects) {
}
httpRequest
=
undefined
;
}
var
feed
=
new
XML
(
doc
.
replace
(
/^<
\?
xml.*
\?
>/g
,
""
));
doc
=
undefined
;
var
feed
=
toLocal
(
new
XML
(
doc
.
replace
(
/^<
\?
xml.*
\?
>/g
,
""
)
));
doc
=
undefined
;
switch
(
feed
.
localName
())
{
case
"
rss
"
:
var
channels
=
feed
.
channel
.
length
();
...
...
src/sbbs3/websrvr.c
View file @
511f43e6
...
...
@@ -2779,6 +2779,8 @@ static BOOL parse_headers(http_session_t * session)
else
{
if
(
session
->
req
.
vary_list
)
strcat
(
p
,
", "
);
else
*
p
=
'\0'
;
strcat
(
p
,
get_header
(
HEAD_UPGRADEINSECURE
));
session
->
req
.
vary_list
=
p
;
...
...
webv4/pages/003-games.xjs
View file @
511f43e6
...
...
@@ -41,7 +41,7 @@
</div>
</div>
<
?
xjs
write
(
'<script id="fTelnetScript" src="//embed-v2.ftelnet.ca/js/ftelnet-loader.norip.noxfer.js?v='
+
(
new
Date
())
.
getTime
()
+
'"></script>'
);
?
>
<
script
id=
"fTelnetScript"
src=
"
<?
xjs
write
(
get_url
());
?>
"
></script
>
<script
type=
"text/javascript"
>
var
wsp
=
<?
xjs
write
(
settings
.
wsp
||
GetWebSocketServicePort
());
?>
;
var
wssp
=
<?
xjs
write
(
settings
.
wssp
||
GetWebSocketServicePort
(
true
));
?>
;
...
...
xtrn/bullshit/bullshit.js
View file @
511f43e6
...
...
@@ -101,6 +101,7 @@ function Viewer(item, disp, settings) {
settings
.
colors
.
text
,
frames
.
top
);
frames
.
content
.
atcodes
=
true
;
if
(
typeof
item
===
'
number
'
)
{
...
...
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