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
0d879033
Commit
0d879033
authored
1 year ago
by
Rob Swindell
Browse files
Options
Downloads
Patches
Plain Diff
Be more terse (remove comments, use shorter key names) for *.can metadata
parent
20dbd40c
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/sbbs3/trash.c
+11
-18
11 additions, 18 deletions
src/sbbs3/trash.c
with
11 additions
and
18 deletions
src/sbbs3/trash.c
+
11
−
18
View file @
0d879033
...
...
@@ -46,13 +46,13 @@ static void parse_trash_details(char* p, struct trash* trash)
if
(
list
==
NULL
)
return
;
trash
->
added
=
iniGetDateTime
(
list
,
ROOT_SECTION
,
"
added
"
,
0
);
trash
->
expires
=
iniGetDateTime
(
list
,
ROOT_SECTION
,
"e
xpires
"
,
0
);
if
((
p
=
iniGetValue
(
list
,
ROOT_SECTION
,
"p
rot
"
,
NULL
,
NULL
))
!=
NULL
)
trash
->
added
=
iniGetDateTime
(
list
,
ROOT_SECTION
,
"
t
"
,
0
);
trash
->
expires
=
iniGetDateTime
(
list
,
ROOT_SECTION
,
"e"
,
0
);
if
((
p
=
iniGetValue
(
list
,
ROOT_SECTION
,
"p"
,
NULL
,
NULL
))
!=
NULL
)
SAFECOPY
(
trash
->
prot
,
p
);
if
((
p
=
iniGetValue
(
list
,
ROOT_SECTION
,
"u
ser
"
,
NULL
,
NULL
))
!=
NULL
)
if
((
p
=
iniGetValue
(
list
,
ROOT_SECTION
,
"u"
,
NULL
,
NULL
))
!=
NULL
)
SAFECOPY
(
trash
->
user
,
p
);
if
((
p
=
iniGetValue
(
list
,
ROOT_SECTION
,
"r
eason
"
,
NULL
,
NULL
))
!=
NULL
)
if
((
p
=
iniGetValue
(
list
,
ROOT_SECTION
,
"r"
,
NULL
,
NULL
))
!=
NULL
)
SAFECOPY
(
trash
->
reason
,
p
);
strListFree
(
&
list
);
}
...
...
@@ -153,24 +153,17 @@ BOOL filter_ip(scfg_t* cfg, const char* prot, const char* reason, const char* ho
if
((
fp
=
fnopen
(
NULL
,
fname
,
O_CREAT
|
O_APPEND
|
O_WRONLY
))
==
NULL
)
return
(
FALSE
);
fprintf
(
fp
,
"
\n
; %s %s "
,
prot
,
reason
);
if
(
username
!=
NULL
)
fprintf
(
fp
,
"by %s "
,
username
);
fprintf
(
fp
,
"on %.24s
\n
"
,
ctime_r
(
&
now
,
tstr
));
if
(
host
!=
NULL
)
fprintf
(
fp
,
"; Hostname: %s
\n
"
,
host
);
fprintf
(
fp
,
"%s
\t
added=%s
\t
prot=%s
\t
reason=%s
\t
"
fprintf
(
fp
,
"%s
\t
t=%s
\t
p=%s
\t
r=%s"
,
ip_addr
,
time_to_isoDateTimeStr
(
now
,
xpTimeZone_local
(),
tstr
,
sizeof
tstr
)
,
prot
,
reason
);
,
prot
,
reason
);
if
(
host
!=
NULL
)
fprintf
(
fp
,
"
host
=%s
\t
"
,
host
);
fprintf
(
fp
,
"
\t
h
=%s"
,
host
);
if
(
username
!=
NULL
)
fprintf
(
fp
,
"
user
=%s
\t
"
,
username
);
fprintf
(
fp
,
"
\t
u
=%s"
,
username
);
if
(
duration
)
fprintf
(
fp
,
"
expires
=%s
\t
"
,
time_to_isoDateTimeStr
(
time
(
NULL
)
+
duration
,
xpTimeZone_local
(),
tstr
,
sizeof
tstr
));
fprintf
(
fp
,
"
\t
e
=%s"
,
time_to_isoDateTimeStr
(
time
(
NULL
)
+
duration
,
xpTimeZone_local
(),
tstr
,
sizeof
tstr
));
fputc
(
'\n'
,
fp
);
fclose
(
fp
);
...
...
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