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
e2d324b4
Commit
e2d324b4
authored
23 years ago
by
rswindell
Browse files
Options
Downloads
Patches
Plain Diff
Added support for hack attempt sound (wave) file.
parent
977d17fc
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
+15
-0
15 additions, 0 deletions
src/sbbs3/ctrl/FtpCfgDlgUnit.cpp
src/sbbs3/ctrl/FtpCfgDlgUnit.dfm
+29
-2
29 additions, 2 deletions
src/sbbs3/ctrl/FtpCfgDlgUnit.dfm
src/sbbs3/ctrl/FtpCfgDlgUnit.h
+5
-1
5 additions, 1 deletion
src/sbbs3/ctrl/FtpCfgDlgUnit.h
with
49 additions
and
3 deletions
src/sbbs3/ctrl/FtpCfgDlgUnit.cpp
+
15
−
0
View file @
e2d324b4
...
...
@@ -78,6 +78,7 @@ void __fastcall TFtpCfgDlg::FormShow(TObject *Sender)
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
);
HackAttemptSoundEdit
->
Text
=
AnsiString
(
MainForm
->
ftp_startup
.
hack_sound
);
CmdLogCheckBox
->
Checked
=
MainForm
->
ftp_startup
.
options
&
FTP_OPT_DEBUG_RX
;
DebugTxCheckBox
->
Checked
=
MainForm
->
ftp_startup
.
options
&
FTP_OPT_DEBUG_TX
;
DebugDataCheckBox
->
Checked
=
MainForm
->
ftp_startup
.
options
&
FTP_OPT_DEBUG_DATA
;
...
...
@@ -144,6 +145,10 @@ void __fastcall TFtpCfgDlg::OKBtnClick(TObject *Sender)
sprintf
(
MainForm
->
ftp_startup
.
hangup_sound
,
"%.*s"
,
sizeof
(
MainForm
->
ftp_startup
.
hangup_sound
)
-
1
,
HangupSoundEdit
->
Text
.
c_str
());
sprintf
(
MainForm
->
ftp_startup
.
hack_sound
,
"%.*s"
,
sizeof
(
MainForm
->
ftp_startup
.
hack_sound
)
-
1
,
HackAttemptSoundEdit
->
Text
.
c_str
());
if
(
DebugTxCheckBox
->
Checked
==
true
)
MainForm
->
ftp_startup
.
options
|=
FTP_OPT_DEBUG_TX
;
else
...
...
@@ -204,6 +209,15 @@ void __fastcall TFtpCfgDlg::HangupSoundButtonClick(TObject *Sender)
}
}
//---------------------------------------------------------------------------
void
__fastcall
TFtpCfgDlg
::
HackAttemptSoundButtonClick
(
TObject
*
Sender
)
{
OpenDialog
->
FileName
=
HackAttemptSoundEdit
->
Text
;
if
(
OpenDialog
->
Execute
()
==
true
)
{
HackAttemptSoundEdit
->
Text
=
OpenDialog
->
FileName
;
sndPlaySound
(
OpenDialog
->
FileName
.
c_str
(),
SND_ASYNC
);
}
}
//---------------------------------------------------------------------------
void
__fastcall
TFtpCfgDlg
::
AutoIndexCheckBoxClick
(
TObject
*
Sender
)
{
...
...
@@ -229,3 +243,4 @@ void __fastcall TFtpCfgDlg::HtmlIndexCheckBoxClick(TObject *Sender)
}
//---------------------------------------------------------------------------
This diff is collapsed.
Click to expand it.
src/sbbs3/ctrl/FtpCfgDlgUnit.dfm
+
29
−
2
View file @
e2d324b4
...
...
@@ -17,7 +17,7 @@ object FtpCfgDlg: TFtpCfgDlg
Top = 4
Width = 342
Height = 245
ActivePage =
Index
TabSheet
ActivePage =
Sound
TabSheet
TabOrder = 0
object GeneralTabSheet: TTabSheet
Caption = 'General'
...
...
@@ -296,7 +296,7 @@ object FtpCfgDlg: TFtpCfgDlg
AutoSize = False
Caption = 'Connect'
end
object H
n
agupSoundLabel: TLabel
object Ha
n
gupSoundLabel: TLabel
Left = 9
Top = 44
Width = 80
...
...
@@ -304,6 +304,14 @@ object FtpCfgDlg: TFtpCfgDlg
AutoSize = False
Caption = 'Disconnect'
end
object HackAttemptSoundLabel: TLabel
Left = 9
Top = 76
Width = 80
Height = 25
AutoSize = False
Caption = 'Hack Attempt'
end
object AnswerSoundEdit: TEdit
Left = 105
Top = 12
...
...
@@ -342,6 +350,25 @@ object FtpCfgDlg: TFtpCfgDlg
TabOrder = 3
OnClick = HangupSoundButtonClick
end
object HackAttemptSoundEdit: TEdit
Left = 105
Top = 76
Width = 192
Height = 24
Hint = 'Sound file to play when users disconnect'
ParentShowHint = False
ShowHint = True
TabOrder = 4
end
object HackAttemptSoundButton: TButton
Left = 304
Top = 76
Width = 25
Height = 26
Caption = '...'
TabOrder = 5
OnClick = HackAttemptSoundButtonClick
end
end
end
object OKBtn: TButton
...
...
This diff is collapsed.
Click to expand it.
src/sbbs3/ctrl/FtpCfgDlgUnit.h
+
5
−
1
View file @
e2d324b4
...
...
@@ -66,7 +66,7 @@ __published:
TLabel
*
AnswerSoundLabel
;
TEdit
*
AnswerSoundEdit
;
TButton
*
AnswerSoundButton
;
TLabel
*
H
n
agupSoundLabel
;
TLabel
*
Ha
n
gupSoundLabel
;
TEdit
*
HangupSoundEdit
;
TButton
*
HangupSoundButton
;
TLabel
*
MaxClientesLabel
;
...
...
@@ -93,6 +93,9 @@ __published:
TEdit
*
HtmlJavaScriptEdit
;
TLabel
*
QwkTimeoutLabel
;
TEdit
*
QwkTimeoutEdit
;
TLabel
*
HackAttemptSoundLabel
;
TEdit
*
HackAttemptSoundEdit
;
TButton
*
HackAttemptSoundButton
;
void
__fastcall
FormShow
(
TObject
*
Sender
);
void
__fastcall
OKBtnClick
(
TObject
*
Sender
);
void
__fastcall
AnswerSoundButtonClick
(
TObject
*
Sender
);
...
...
@@ -100,6 +103,7 @@ __published:
void
__fastcall
AutoIndexCheckBoxClick
(
TObject
*
Sender
);
void
__fastcall
HtmlJavaScriptButtonClick
(
TObject
*
Sender
);
void
__fastcall
HtmlIndexCheckBoxClick
(
TObject
*
Sender
);
void
__fastcall
HackAttemptSoundButtonClick
(
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