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
f14c4939
Commit
f14c4939
authored
22 years ago
by
rswindell
Browse files
Options
Downloads
Patches
Plain Diff
MsgBase class now requires an open() method call.
parent
46e64a88
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
exec/chkspace.js
+4
-0
4 additions, 0 deletions
exec/chkspace.js
exec/newslink.js
+3
-2
3 additions, 2 deletions
exec/newslink.js
exec/nntpservice.js
+16
-6
16 additions, 6 deletions
exec/nntpservice.js
with
23 additions
and
8 deletions
exec/chkspace.js
+
4
−
0
View file @
f14c4939
...
...
@@ -12,6 +12,10 @@ if(freespace==-1 || freespace > Number(argv[0])*1024*1024)
log
(
"
!Low disk space:
"
+
freespace
+
"
bytes
"
);
msgbase
=
new
MsgBase
(
"
mail
"
);
if
(
msgbase
.
open
!=
undefined
&&
msgbase
.
open
()
==
false
)
{
log
(
"
!ERROR
"
+
msgbase
.
last_error
);
exit
();
}
hdr
=
{
to
:
'
sysop
'
,
to_ext
:
'
1
'
,
from
:
'
chkspace
'
,
subject
:
'
Low disk space notification
'
}
...
...
This diff is collapsed.
Click to expand it.
exec/newslink.js
+
3
−
2
View file @
f14c4939
...
...
@@ -214,8 +214,9 @@ for(i in area) {
printf
(
"
sub: %s, newsgroup: %s
\r\n
"
,
sub
,
newsgroup
);
msgbase
=
new
MsgBase
(
sub
);
if
(
msgbase
==
null
)
{
printf
(
"
!ERROR opening msgbase: %s
\r\n
"
,
sub
);
if
(
msgbase
.
open
!=
undefined
&&
msgbase
.
open
()
==
false
)
{
printf
(
"
!ERROR %s opening msgbase: %s
\r\n
"
,
msgbase
.
last_error
,
sub
);
delete
msgbase
;
continue
;
}
...
...
This diff is collapsed.
Click to expand it.
exec/nntpservice.js
+
16
−
6
View file @
f14c4939
...
...
@@ -78,11 +78,14 @@ function getReferenceTo(reference) {
var
msg
=
parseInt
(
reference
.
replace
(
re
,
"
$1
"
));
var
msgbase
=
new
MsgBase
(
sub
);
if
(
msgbase
!=
null
)
{
var
hdr
=
msgbase
.
get_msg_header
(
false
,
msg
);
if
(
hdr
!=
null
)
to
=
hdr
.
from
;
}
if
(
msgbase
.
open
!=
undefined
&&
msgbase
.
open
()
==
false
)
return
to
;
var
hdr
=
msgbase
.
get_msg_header
(
false
,
msg
);
if
(
hdr
!=
null
)
to
=
hdr
.
from
;
msgbase
.
close
();
return
to
;
}
...
...
@@ -205,6 +208,8 @@ while(client.socket.is_connected) {
for
(
g
in
msg_area
.
grp_list
)
for
(
s
in
msg_area
.
grp_list
[
g
].
sub_list
)
{
msgbase
=
new
MsgBase
(
msg_area
.
grp_list
[
g
].
sub_list
[
s
].
code
);
if
(
msgbase
.
open
!=
undefined
&&
msgbase
.
open
()
==
false
)
continue
;
writeln
(
format
(
"
%s %u %u %s
"
,
msg_area
.
grp_list
[
g
].
sub_list
[
s
].
newsgroup
,
msgbase
.
last_msg
...
...
@@ -237,9 +242,12 @@ while(client.socket.is_connected) {
for
(
g
in
msg_area
.
grp_list
)
for
(
s
in
msg_area
.
grp_list
[
g
].
sub_list
)
if
(
msg_area
.
grp_list
[
g
].
sub_list
[
s
].
newsgroup
.
toLowerCase
()
==
cmd
[
1
].
toLowerCase
())
{
found
=
true
;
msgbase
=
new
MsgBase
(
msg_area
.
grp_list
[
g
].
sub_list
[
s
].
code
);
if
(
msgbase
.
open
!=
undefined
&&
msgbase
.
open
()
==
false
)
continue
;
found
=
true
;
selected
=
msg_area
.
grp_list
[
g
].
sub_list
[
s
];
break
;
}
if
(
found
)
writeln
(
format
(
"
211 %u %u %u %s group selected
"
...
...
@@ -652,6 +660,8 @@ while(client.socket.is_connected) {
hdr
.
from
=
user
.
name
;
// Use real names
msgbase
=
new
MsgBase
(
msg_area
.
grp_list
[
g
].
sub_list
[
s
].
code
);
if
(
msgbase
.
open
!=
undefined
&&
msgbase
.
open
()
==
false
)
continue
;
if
(
msgbase
.
save_msg
(
hdr
,
body
))
{
log
(
format
(
"
%s posted a message on %s
"
,
user
.
alias
,
newsgroups
[
n
]));
writeln
(
"
240 article posted ok
"
);
...
...
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