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
737e0a60
Commit
737e0a60
authored
23 years ago
by
rswindell
Browse files
Options
Downloads
Patches
Plain Diff
Added QWK timeout and HTML/JavaScript index file support.
parent
a741e75c
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
src/sbbs3/ctrl/FtpCfgDlgUnit.cpp
+36
-0
36 additions, 0 deletions
src/sbbs3/ctrl/FtpCfgDlgUnit.cpp
src/sbbs3/ctrl/FtpCfgDlgUnit.dfm
+124
-60
124 additions, 60 deletions
src/sbbs3/ctrl/FtpCfgDlgUnit.dfm
src/sbbs3/ctrl/FtpCfgDlgUnit.h
+11
-2
11 additions, 2 deletions
src/sbbs3/ctrl/FtpCfgDlgUnit.h
with
171 additions
and
62 deletions
src/sbbs3/ctrl/FtpCfgDlgUnit.cpp
+
36
−
0
View file @
737e0a60
...
...
@@ -68,11 +68,14 @@ void __fastcall TFtpCfgDlg::FormShow(TObject *Sender)
}
MaxClientsEdit
->
Text
=
AnsiString
((
int
)
MainForm
->
ftp_startup
.
max_clients
);
MaxInactivityEdit
->
Text
=
AnsiString
((
int
)
MainForm
->
ftp_startup
.
max_inactivity
);
QwkTimeoutEdit
->
Text
=
AnsiString
((
int
)
MainForm
->
ftp_startup
.
qwk_timeout
);
PortEdit
->
Text
=
AnsiString
((
int
)
MainForm
->
ftp_startup
.
port
);
AutoStartCheckBox
->
Checked
=
MainForm
->
FtpAutoStart
;
LogFileCheckBox
->
Checked
=
MainForm
->
FtpLogFile
;
IndexFileNameEdit
->
Text
=
AnsiString
(
MainForm
->
ftp_startup
.
index_file_name
);
HtmlFileNameEdit
->
Text
=
AnsiString
(
MainForm
->
ftp_startup
.
html_index_file
);
HtmlJavaScriptEdit
->
Text
=
AnsiString
(
MainForm
->
ftp_startup
.
html_index_script
);
AnswerSoundEdit
->
Text
=
AnsiString
(
MainForm
->
ftp_startup
.
answer_sound
);
HangupSoundEdit
->
Text
=
AnsiString
(
MainForm
->
ftp_startup
.
hangup_sound
);
CmdLogCheckBox
->
Checked
=
MainForm
->
ftp_startup
.
options
&
FTP_OPT_DEBUG_RX
;
...
...
@@ -87,6 +90,10 @@ void __fastcall TFtpCfgDlg::FormShow(TObject *Sender)
=!
(
MainForm
->
ftp_startup
.
options
&
FTP_OPT_NO_HOST_LOOKUP
);
AutoIndexCheckBox
->
Checked
=
MainForm
->
ftp_startup
.
options
&
FTP_OPT_INDEX_FILE
;
AutoIndexCheckBoxClick
(
Sender
);
HtmlIndexCheckBox
->
Checked
=
MainForm
->
ftp_startup
.
options
&
FTP_OPT_HTML_INDEX_FILE
;
HtmlIndexCheckBoxClick
(
Sender
);
PageControl
->
ActivePage
=
GeneralTabSheet
;
}
//---------------------------------------------------------------------------
...
...
@@ -116,6 +123,7 @@ void __fastcall TFtpCfgDlg::OKBtnClick(TObject *Sender)
MainForm
->
ftp_startup
.
interface_addr
=
0
;
MainForm
->
ftp_startup
.
max_clients
=
MaxClientsEdit
->
Text
.
ToIntDef
(
10
);
MainForm
->
ftp_startup
.
max_inactivity
=
MaxInactivityEdit
->
Text
.
ToIntDef
(
300
);
MainForm
->
ftp_startup
.
qwk_timeout
=
QwkTimeoutEdit
->
Text
.
ToIntDef
(
600
);
MainForm
->
ftp_startup
.
port
=
PortEdit
->
Text
.
ToIntDef
(
23
);
MainForm
->
FtpAutoStart
=
AutoStartCheckBox
->
Checked
;
MainForm
->
FtpLogFile
=
LogFileCheckBox
->
Checked
;
...
...
@@ -123,6 +131,13 @@ void __fastcall TFtpCfgDlg::OKBtnClick(TObject *Sender)
sprintf
(
MainForm
->
ftp_startup
.
index_file_name
,
"%.*s"
,
sizeof
(
MainForm
->
ftp_startup
.
index_file_name
)
-
1
,
IndexFileNameEdit
->
Text
.
c_str
());
sprintf
(
MainForm
->
ftp_startup
.
html_index_file
,
"%.*s"
,
sizeof
(
MainForm
->
ftp_startup
.
html_index_file
)
-
1
,
HtmlFileNameEdit
->
Text
.
c_str
());
sprintf
(
MainForm
->
ftp_startup
.
html_index_script
,
"%.*s"
,
sizeof
(
MainForm
->
ftp_startup
.
html_index_script
)
-
1
,
HtmlJavaScriptEdit
->
Text
.
c_str
());
sprintf
(
MainForm
->
ftp_startup
.
answer_sound
,
"%.*s"
,
sizeof
(
MainForm
->
ftp_startup
.
answer_sound
)
-
1
,
AnswerSoundEdit
->
Text
.
c_str
());
...
...
@@ -161,6 +176,10 @@ void __fastcall TFtpCfgDlg::OKBtnClick(TObject *Sender)
MainForm
->
ftp_startup
.
options
|=
FTP_OPT_INDEX_FILE
;
else
MainForm
->
ftp_startup
.
options
&=~
FTP_OPT_INDEX_FILE
;
if
(
HtmlIndexCheckBox
->
Checked
==
true
)
MainForm
->
ftp_startup
.
options
|=
FTP_OPT_HTML_INDEX_FILE
;
else
MainForm
->
ftp_startup
.
options
&=~
FTP_OPT_HTML_INDEX_FILE
;
MainForm
->
SaveSettings
(
Sender
);
}
...
...
@@ -193,3 +212,20 @@ void __fastcall TFtpCfgDlg::AutoIndexCheckBoxClick(TObject *Sender)
//---------------------------------------------------------------------------
void
__fastcall
TFtpCfgDlg
::
HtmlJavaScriptButtonClick
(
TObject
*
Sender
)
{
OpenDialog
->
FileName
=
HtmlJavaScriptEdit
->
Text
;
if
(
OpenDialog
->
Execute
()
==
true
)
{
HtmlJavaScriptEdit
->
Text
=
OpenDialog
->
FileName
;
}
}
//---------------------------------------------------------------------------
void
__fastcall
TFtpCfgDlg
::
HtmlIndexCheckBoxClick
(
TObject
*
Sender
)
{
HtmlFileNameEdit
->
Enabled
=
HtmlIndexCheckBox
->
Checked
;
HtmlJavaScriptEdit
->
Enabled
=
HtmlIndexCheckBox
->
Checked
;
HtmlJavaScriptLabel
->
Enabled
=
HtmlIndexCheckBox
->
Checked
;
}
//---------------------------------------------------------------------------
This diff is collapsed.
Click to expand it.
src/sbbs3/ctrl/FtpCfgDlgUnit.dfm
+
124
−
60
View file @
737e0a60
object FtpCfgDlg: TFtpCfgDlg
Left =
466
Top =
622
Left =
754
Top =
408
BorderStyle = bsDialog
Caption = 'FTP Server Configuration'
ClientHeight =
288
ClientHeight =
301
ClientWidth = 352
Color = clBtnFace
ParentFont = True
...
...
@@ -16,48 +16,56 @@ object FtpCfgDlg: TFtpCfgDlg
Left = 4
Top = 4
Width = 342
Height = 2
29
ActivePage =
Sound
TabSheet
Height = 2
45
ActivePage =
Index
TabSheet
TabOrder = 0
object GeneralTabSheet: TTabSheet
Caption = 'General'
object MaxClientesLabel: TLabel
Left = 9
Top = 10
2
Top = 10
6
Width = 96
Height = 2
4
Height = 2
5
AutoSize = False
Caption = 'Max Clients'
end
object MaxInactivityLabel: TLabel
Left = 9
Top = 13
2
Top = 13
8
Width = 96
Height = 2
4
Height = 2
5
AutoSize = False
Caption = 'Max Inactivity'
end
object PortLabel: TLabel
Left = 9
Top =
68
Top =
74
Width = 96
Height = 2
4
Height = 2
5
AutoSize = False
Caption = 'Control Port'
end
object InterfaceLabel: TLabel
Left = 9
Top =
36
Top =
42
Width = 96
Height = 2
4
Height = 2
5
AutoSize = False
Caption = 'Interface (IP)'
end
object QwkTimeoutLabel: TLabel
Left = 9
Top = 170
Width = 96
Height = 25
AutoSize = False
Caption = 'QWK Timeout'
end
object AutoStartCheckBox: TCheckBox
Left = 9
Top =
6
Top =
12
Width = 144
Height = 2
4
Height = 2
5
Hint = 'Automatically start FTP server'
Caption = 'Auto Startup'
ParentShowHint = False
...
...
@@ -66,7 +74,7 @@ object FtpCfgDlg: TFtpCfgDlg
end
object MaxClientsEdit: TEdit
Left = 105
Top = 10
0
Top = 10
6
Width = 48
Height = 24
Hint = 'Maximum number of simultaneous clients (default=10)'
...
...
@@ -76,7 +84,7 @@ object FtpCfgDlg: TFtpCfgDlg
end
object MaxInactivityEdit: TEdit
Left = 105
Top = 13
2
Top = 13
8
Width = 48
Height = 24
Hint =
...
...
@@ -88,7 +96,7 @@ object FtpCfgDlg: TFtpCfgDlg
end
object PortEdit: TEdit
Left = 105
Top =
68
Top =
74
Width = 48
Height = 24
Hint = 'TCP port to use for FTP control connections (default=21)'
...
...
@@ -98,7 +106,7 @@ object FtpCfgDlg: TFtpCfgDlg
end
object NetworkInterfaceEdit: TEdit
Left = 105
Top =
36
Top =
42
Width = 192
Height = 24
Hint = 'Your network adapter'#39's static IP address or blank for <ANY>'
...
...
@@ -106,55 +114,35 @@ object FtpCfgDlg: TFtpCfgDlg
ShowHint = True
TabOrder = 2
end
object AutoIndexCheckBox: TCheckBox
Left = 9
Top = 162
Width = 96
Height = 24
Hint = 'Automatically generate index files for file descriptions'
Caption = 'Auto Index'
TabOrder = 6
OnClick = AutoIndexCheckBoxClick
end
object IndexFileNameEdit: TEdit
Left = 105
Top = 164
Width = 192
Height = 24
Hint = 'Name of auto-index file (default=00index)'
ParentShowHint = False
ShowHint = True
TabOrder = 7
end
object AllowQWKCheckBox: TCheckBox
Left = 182
Top =
68
Top =
74
Width = 147
Height = 2
4
Height = 2
5
Hint = 'Allow QWK packet transfers'
Caption = 'QWK Packets'
ParentShowHint = False
ShowHint = True
TabOrder =
8
TabOrder =
7
end
object LocalFileSysCheckBox: TCheckBox
Left = 182
Top = 10
0
Top = 10
6
Width = 147
Height = 2
4
Height = 2
5
Hint =
'Allow sysop access to local file system (requires sysop password' +
')'
Caption = 'Local File System'
ParentShowHint = False
ShowHint = True
TabOrder =
9
TabOrder =
8
end
object HostnameCheckBox: TCheckBox
Left = 182
Top =
6
Top =
12
Width = 147
Height = 2
4
Height = 2
5
Hint = 'Automatically lookup client'#39's hostnames via DNS'
Caption = 'Hostname Lookup'
ParentShowHint = False
...
...
@@ -163,14 +151,90 @@ object FtpCfgDlg: TFtpCfgDlg
end
object DirFilesCheckBox: TCheckBox
Left = 182
Top = 1
29
Top = 1
35
Width = 154
Height = 25
Hint = 'Allow users access to files in directory, but not in database'
Caption = 'Directory File Access'
ParentShowHint = False
ShowHint = True
TabOrder = 10
TabOrder = 9
end
object QwkTimeoutEdit: TEdit
Left = 105
Top = 170
Width = 48
Height = 24
Hint = 'Maximum number of seconds before QWK packet creation timeout'
ParentShowHint = False
ShowHint = True
TabOrder = 6
end
end
object IndexTabSheet: TTabSheet
Caption = 'Index'
ImageIndex = 3
object HtmlJavaScriptLabel: TLabel
Left = 9
Top = 76
Width = 80
Height = 25
AutoSize = False
Caption = 'JavaScript'
end
object AutoIndexCheckBox: TCheckBox
Left = 9
Top = 12
Width = 96
Height = 24
Hint = 'Automatically generate index files for file descriptions'
Caption = 'ASCII'
ParentShowHint = False
ShowHint = True
TabOrder = 0
OnClick = AutoIndexCheckBoxClick
end
object IndexFileNameEdit: TEdit
Left = 105
Top = 12
Width = 192
Height = 24
Hint = 'Name of ASCII index file (default=00index)'
ParentShowHint = False
ShowHint = True
TabOrder = 1
end
object HtmlIndexCheckBox: TCheckBox
Left = 9
Top = 44
Width = 96
Height = 24
Hint = 'Automatically generate HTML index files for file descriptions'
Caption = 'HTML'
ParentShowHint = False
ShowHint = True
TabOrder = 2
OnClick = HtmlIndexCheckBoxClick
end
object HtmlFileNameEdit: TEdit
Left = 105
Top = 44
Width = 192
Height = 24
Hint = 'Name of HTML index file (default=00index.html)'
ParentShowHint = False
ShowHint = True
TabOrder = 3
end
object HtmlJavaScriptEdit: TEdit
Left = 105
Top = 76
Width = 192
Height = 24
Hint = 'JavaScript filename to execute to generate HTML index file'
ParentShowHint = False
ShowHint = True
TabOrder = 4
end
end
object LogTabSheet: TTabSheet
...
...
@@ -178,7 +242,7 @@ object FtpCfgDlg: TFtpCfgDlg
ImageIndex = 1
object DebugTxCheckBox: TCheckBox
Left = 9
Top =
36
Top =
42
Width = 192
Height = 24
Hint = 'Log (debug) transmitted FTP responses'
...
...
@@ -189,7 +253,7 @@ object FtpCfgDlg: TFtpCfgDlg
end
object CmdLogCheckBox: TCheckBox
Left = 9
Top =
6
Top =
12
Width = 192
Height = 24
Hint = 'Log (debug) all received FTP commands'
...
...
@@ -200,7 +264,7 @@ object FtpCfgDlg: TFtpCfgDlg
end
object DebugDataCheckBox: TCheckBox
Left = 9
Top =
66
Top =
72
Width = 192
Height = 24
Hint = 'Log (debug) data channel operations'
...
...
@@ -211,7 +275,7 @@ object FtpCfgDlg: TFtpCfgDlg
end
object LogFileCheckBox: TCheckBox
Left = 9
Top =
96
Top =
102
Width = 144
Height = 25
Hint = 'Save log entries to a file (in your DATA directory)'
...
...
@@ -241,9 +305,9 @@ object FtpCfgDlg: TFtpCfgDlg
Caption = 'Disconnect'
end
object AnswerSoundEdit: TEdit
Left =
89
Left =
105
Top = 12
Width =
208
Width =
192
Height = 24
Hint = 'Sound file to play when users connect'
ParentShowHint = False
...
...
@@ -260,9 +324,9 @@ object FtpCfgDlg: TFtpCfgDlg
OnClick = AnswerSoundButtonClick
end
object HangupSoundEdit: TEdit
Left =
89
Left =
105
Top = 44
Width =
208
Width =
192
Height = 24
Hint = 'Sound file to play when users disconnect'
ParentShowHint = False
...
...
@@ -282,7 +346,7 @@ object FtpCfgDlg: TFtpCfgDlg
end
object OKBtn: TButton
Left = 25
Top = 2
47
Top = 2
60
Width = 93
Height = 30
Anchors = [akLeft, akBottom]
...
...
@@ -294,7 +358,7 @@ object FtpCfgDlg: TFtpCfgDlg
end
object CancelBtn: TButton
Left = 128
Top = 2
47
Top = 2
60
Width = 92
Height = 30
Anchors = [akLeft, akBottom]
...
...
@@ -305,7 +369,7 @@ object FtpCfgDlg: TFtpCfgDlg
end
object ApplyBtn: TButton
Left = 233
Top = 2
47
Top = 2
60
Width = 93
Height = 30
Anchors = [akLeft, akBottom]
...
...
This diff is collapsed.
Click to expand it.
src/sbbs3/ctrl/FtpCfgDlgUnit.h
+
11
−
2
View file @
737e0a60
...
...
@@ -77,8 +77,6 @@ __published:
TEdit
*
PortEdit
;
TLabel
*
InterfaceLabel
;
TEdit
*
NetworkInterfaceEdit
;
TCheckBox
*
AutoIndexCheckBox
;
TEdit
*
IndexFileNameEdit
;
TCheckBox
*
AllowQWKCheckBox
;
TCheckBox
*
LocalFileSysCheckBox
;
TCheckBox
*
HostnameCheckBox
;
...
...
@@ -86,11 +84,22 @@ __published:
TButton
*
CancelBtn
;
TButton
*
ApplyBtn
;
TCheckBox
*
DirFilesCheckBox
;
TTabSheet
*
IndexTabSheet
;
TCheckBox
*
AutoIndexCheckBox
;
TEdit
*
IndexFileNameEdit
;
TCheckBox
*
HtmlIndexCheckBox
;
TEdit
*
HtmlFileNameEdit
;
TLabel
*
HtmlJavaScriptLabel
;
TEdit
*
HtmlJavaScriptEdit
;
TLabel
*
QwkTimeoutLabel
;
TEdit
*
QwkTimeoutEdit
;
void
__fastcall
FormShow
(
TObject
*
Sender
);
void
__fastcall
OKBtnClick
(
TObject
*
Sender
);
void
__fastcall
AnswerSoundButtonClick
(
TObject
*
Sender
);
void
__fastcall
HangupSoundButtonClick
(
TObject
*
Sender
);
void
__fastcall
AutoIndexCheckBoxClick
(
TObject
*
Sender
);
void
__fastcall
HtmlJavaScriptButtonClick
(
TObject
*
Sender
);
void
__fastcall
HtmlIndexCheckBoxClick
(
TObject
*
Sender
);
private:
public:
virtual
__fastcall
TFtpCfgDlg
(
TComponent
*
AOwner
);
...
...
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