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
7d8dc4b9
Commit
7d8dc4b9
authored
21 years ago
by
rswindell
Browse files
Options
Downloads
Patches
Plain Diff
added support for s flag - no subject filtering
parent
cd067e45
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
exec/newslink.js
+7
-4
7 additions, 4 deletions
exec/newslink.js
with
7 additions
and
4 deletions
exec/newslink.js
+
7
−
4
View file @
7d8dc4b9
...
...
@@ -22,6 +22,7 @@
// r remove "Newsgroups:" header field from imported messages
// u uudecode attachments
// i import all (not just new articles)
// s no subject filtering
const
REVISION
=
"
$Revision$
"
.
split
(
'
'
)[
1
];
...
...
@@ -449,7 +450,7 @@ for(i in area) {
var
hdr
=
{
from
:
""
,
to
:
newsgroup
,
subject
:
""
,
id
:
""
};
var
line_counter
=
0
;
var
recv_lines
=
0
;
var
file
;
var
file
=
undefined
;
var
md5
;
while
(
socket
.
is_connected
)
{
...
...
@@ -483,7 +484,7 @@ for(i in area) {
if
(
flags
.
indexOf
(
'
u
'
)
>=
0
)
{
// uudecode attachments
if
(
line
.
substr
(
0
,
6
)
==
"
begin
"
)
{
// Parse uuencode header
arg
=
line
.
split
(
'
'
);
arg
=
line
.
split
(
/
\s
+/
);
arg
.
splice
(
0
,
2
);
// strip "begin 666 "
fname
=
file_getname
(
arg
.
join
(
"
"
));
if
(
file_exists
(
attachment_dir
+
fname
))
{
// generate unique name, if necessary
...
...
@@ -546,7 +547,9 @@ for(i in area) {
}
md5_list
.
push
(
md5
);
if
(
partial
)
file_rename
(
file
.
name
,
hdr
.
subject
.
replace
(
/
\/
/g
,
'
.
'
));
file_rename
(
file
.
name
,
attachment_dir
+
hdr
.
subject
.
replace
(
/
\/
/g
,
'
.
'
).
replace
(
/ /g
,
'
_
'
)
+
"
.part
"
);
}
if
(
truncsp
(
body
).
length
==
0
)
{
...
...
@@ -567,7 +570,7 @@ for(i in area) {
&&
hdr
.
gateway
.
indexOf
(
system
.
inetaddr
)
!=-
1
)
continue
;
if
(
system
.
trashcan
(
"
subject
"
,
hdr
.
subject
))
{
if
(
flags
.
indexOf
(
'
s
'
)
==-
1
&&
system
.
trashcan
(
"
subject
"
,
hdr
.
subject
))
{
printf
(
"
!BLOCKED subject: %s
\r\n
"
,
hdr
.
subject
);
var
reason
=
format
(
"
Blocked subject (%s)
"
,
hdr
.
subject
);
system
.
spamlog
(
"
NNTP
"
,
"
NOT IMPORTED
"
,
reason
,
hdr
.
from
,
server
,
hdr
.
to
);
...
...
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