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
6efd374c
Commit
6efd374c
authored
15 years ago
by
deuce
Browse files
Options
Downloads
Patches
Plain Diff
Remove stubs which will never be filled.
parent
07e98229
No related branches found
No related tags found
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
exec/imapservice.js
+0
-17
0 additions, 17 deletions
exec/imapservice.js
exec/sbbsimsg.js
+1
-115
1 addition, 115 deletions
exec/sbbsimsg.js
exec/termtest.js
+6
-1
6 additions, 1 deletion
exec/termtest.js
with
7 additions
and
133 deletions
exec/imapservice.js
+
0
−
17
View file @
6efd374c
...
@@ -11,23 +11,6 @@
...
@@ -11,23 +11,6 @@
var
sepchar
=
"
|
"
;
var
sepchar
=
"
|
"
;
var
debug
=
true
;
var
debug
=
true
;
// State handling functions
function
not_authenticated
()
{
}
function
authenticated
()
{
}
function
selected
()
{
}
function
logout
()
{
}
function
debug_log
(
line
)
function
debug_log
(
line
)
{
{
if
(
debug
)
if
(
debug
)
...
...
This diff is collapsed.
Click to expand it.
exec/sbbsimsg.js
+
1
−
115
View file @
6efd374c
// sbbsimsg.js
// sbbsimsg.js
// Synchronet inter-bbs instant message module
// Synchronet inter-bbs instant message module
// uses Finger and SMTP TCP/IP protocols
// $Id$
// $Id$
...
@@ -152,9 +151,7 @@ function list_users(show)
...
@@ -152,9 +151,7 @@ function list_users(show)
if
(
sys
[
i
].
ip
==
undefined
)
if
(
sys
[
i
].
ip
==
undefined
)
continue
;
continue
;
/* Try SYSTAT and finger */
/* Try SYSTAT and finger */
sock
.
sendto
(
"
\r\n
"
,
sys
[
i
].
ip
,
IPPORT_SYSTAT
);
// Get list of active users
if
(
!
sock
.
sendto
(
"
\r\n
"
,
sys
[
i
].
ip
,
IPPORT_SYSTAT
))
// Get list of active users
if
(
!
sock
.
sendto
(
"
\r\n
"
,
sys
[
i
].
ip
,
IPPORT_FINGER
))
// Get list of active users
//printf("FAILED! (%d) Sending to %s\r\n",sock.last_error,sys[i].addr);
continue
;
continue
;
udp_req
++
;
udp_req
++
;
}
}
...
@@ -192,77 +189,6 @@ function list_users(show)
...
@@ -192,77 +189,6 @@ function list_users(show)
sock
.
close
();
sock
.
close
();
/* TCP systems */
for
(
i
=
0
;
sys
[
i
]
!=
undefined
&&
!
(
bbs
.
sys_status
&
SS_ABORT
);
i
++
)
{
if
(
sys
[
i
].
udp
)
continue
;
if
(
sys
[
i
].
failed
)
continue
;
begin
=
new
Date
();
if
(
show
)
{
console
.
line_counter
=
0
;
// defeat pause
printf
(
"
\
1n
\
1h%-25.25s
\
1n
"
,
sys
[
i
].
addr
);
}
replies
++
;
// we're adding the number of Finger requests here
sock
=
new
Socket
();
sock
.
bind
(
0
,
server
.
interface_ip_address
);
is_connected
=
false
;
/* Try SYSTAT first */
/* By IP */
if
(
sys
[
i
].
ip
!=
undefined
)
{
is_connected
=
sock
.
connect
(
sys
[
i
].
ip
,
IPPORT_SYSTAT
,
5
);
if
(
!
is_connected
)
{
is_connected
=
sock
.
connect
(
sys
[
i
].
ip
,
IPPORT_FINGER
,
5
);
if
(
!
is_connected
)
sys
[
i
].
ip
=
undefined
;
// IP no good, remove from cache
}
}
/* By addr */
if
(
!
is_connected
)
{
/* Try by addr */
is_connected
=
sock
.
connect
(
sys
[
i
].
addr
,
IPPORT_SYSTAT
,
5
);
if
(
!
is_connected
)
{
is_connected
=
sock
.
connect
(
sys
[
i
].
addr
,
IPPORT_FINGER
,
5
);
}
}
if
(
!
is_connected
)
{
log
(
format
(
"
!SYSTAT and Finger connections to %s FAILED with error %d
"
,
sys
[
i
].
addr
,
sock
.
last_error
));
alert
(
"
system not available
"
);
sys
[
i
].
failed
=
true
;
continue
;
}
sys
[
i
].
reply
=
new
Date
().
valueOf
()
-
begin
.
valueOf
();
// cache the IP address for faster resolution
if
(
sys
[
i
].
ip
!=
sock
.
remote_ip_address
)
sys
[
i
].
ip
=
sock
.
remote_ip_address
;
if
(
sock
.
remote_port
==
IPPORT_FINGER
)
sock
.
send
(
"
\r\n
"
);
// Get list of active users
var
response
=
new
Array
();
while
(
bbs
.
online
&&
sock
.
is_connected
)
{
str
=
sock
.
readline
();
if
(
str
==
null
)
break
;
str
=
truncsp
(
str
);
if
(
str
==
""
)
continue
;
response
.
push
(
str
);
}
sock
.
close
();
parse_response
(
response
,
show
);
}
t
=
new
Date
().
valueOf
()
-
start
.
valueOf
();
t
=
new
Date
().
valueOf
()
-
start
.
valueOf
();
printf
(
"
\
1m
\
1h%lu systems (%lu UDP) and %lu users listed in %d seconds.
\r\n
"
printf
(
"
\
1m
\
1h%lu systems (%lu UDP) and %lu users listed in %d seconds.
\r\n
"
,
replies
,
udp_replies
,
users
,
t
/
1000
);
,
replies
,
udp_replies
,
users
,
t
/
1000
);
...
@@ -295,46 +221,6 @@ function send_msg(dest, msg)
...
@@ -295,46 +221,6 @@ function send_msg(dest, msg)
do
{
do
{
if
(
!
sock
.
connect
(
host
,
IPPORT_MSP
))
{
if
(
!
sock
.
connect
(
host
,
IPPORT_MSP
))
{
alert
(
"
MSP Connection to
"
+
host
+
"
failed with error
"
+
sock
.
last_error
);
alert
(
"
MSP Connection to
"
+
host
+
"
failed with error
"
+
sock
.
last_error
);
if
(
!
sock
.
connect
(
host
,
IPPORT_SMTP
))
{
alert
(
"
Connection to
"
+
host
+
"
failed with error
"
+
sock
.
last_error
);
break
;
}
if
(
Number
((
rsp
=
sock
.
recvline
()).
slice
(
0
,
3
))
!=
220
)
{
alert
(
"
Invalid connection response:
\r\n
"
+
rsp
);
break
;
}
sock
.
send
(
"
HELO
"
+
system
.
inetaddr
+
"
\r\n
"
);
if
(
Number
((
rsp
=
sock
.
recvline
()).
slice
(
0
,
3
))
!=
250
)
{
alert
(
"
Invalid HELO response:
"
+
rsp
);
break
;
}
sock
.
send
(
"
SOML FROM:
"
+
user
.
email
+
"
\r\n
"
);
if
(
Number
((
rsp
=
sock
.
recvline
()).
slice
(
0
,
3
))
!=
250
)
{
alert
(
"
Invalid SOML response:
"
+
rsp
);
break
;
}
if
(
dest
.
indexOf
(
'
<
'
)
<
0
)
dest
=
'
<
'
+
dest
+
'
>
'
;
sock
.
send
(
"
RCPT TO:
"
+
dest
+
"
\r\n
"
);
if
(
Number
((
rsp
=
sock
.
recvline
()).
slice
(
0
,
3
))
!=
250
)
{
alert
(
"
Invalid RCPT TO response:
"
+
rsp
);
break
;
}
sock
.
send
(
"
DATA
\r\n
"
);
if
(
Number
((
rsp
=
sock
.
recvline
()).
slice
(
0
,
3
))
!=
354
)
{
alert
(
"
Invalid DATA response:
"
+
rsp
);
break
;
}
sock
.
send
(
msg
);
sock
.
send
(
"
\r\n
.
\r\n
"
);
if
(
Number
((
rsp
=
sock
.
recvline
()).
slice
(
0
,
3
))
!=
250
)
{
alert
(
"
Invalid end of message response:
"
+
rsp
);
break
;
}
sock
.
send
(
"
QUIT
\r\n
"
);
print
(
"
Message delivered successfully.
"
);
}
}
else
{
else
{
sock
.
send
(
"
B
"
+
destuser
+
"
\
0
"
+
/* Dest node +*/
"
\
0
"
+
msg
+
"
\
0
"
+
user
.
name
+
"
\
0
"
+
"
Node:
"
+
bbs
.
node_num
+
"
\
0
\
0
"
+
system
.
name
+
"
\
0
"
);
sock
.
send
(
"
B
"
+
destuser
+
"
\
0
"
+
/* Dest node +*/
"
\
0
"
+
msg
+
"
\
0
"
+
user
.
name
+
"
\
0
"
+
"
Node:
"
+
bbs
.
node_num
+
"
\
0
\
0
"
+
system
.
name
+
"
\
0
"
);
...
...
This diff is collapsed.
Click to expand it.
exec/termtest.js
+
6
−
1
View file @
6efd374c
...
@@ -708,7 +708,9 @@ function test_ctrl_seqs(results)
...
@@ -708,7 +708,9 @@ function test_ctrl_seqs(results)
desc
:
"
Cursor Next Line
"
,
desc
:
"
Cursor Next Line
"
,
test
:
function
(
results
)
{
test
:
function
(
results
)
{
if
(
results
.
ctrl_seqs
.
CUU
)
{
if
(
results
.
ctrl_seqs
.
CUU
)
{
console
.
writeln
(
"
Cursor Next Line Test
\
033[ECursor Next Line Test
\
033[A
\
033[2ECursor Next Line Test
"
);
console
.
crlf
();
console
.
crlf
();
console
.
writeln
(
"
\
033[2ACursor Next Line Test
\
033[ECursor Next Line Test
\
033[A
\
033[2ECursor Next Line Test
"
);
return
(
console
.
yesno
(
"
Are the previous three lines identical
"
));
return
(
console
.
yesno
(
"
Are the previous three lines identical
"
));
}
}
return
(
null
);
return
(
null
);
...
@@ -748,6 +750,9 @@ function test_ctrl_seqs(results)
...
@@ -748,6 +750,9 @@ function test_ctrl_seqs(results)
},
},
"
CUP
"
:{
"
CUP
"
:{
char
:
"
H
"
,
char
:
"
H
"
,
test
:
function
(
results
)
{
},
},
},
"
CHT
"
:{
"
CHT
"
:{
char
:
"
I
"
,
char
:
"
I
"
,
...
...
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