diff --git a/src/sbbs3/ctrl/FtpCfgDlgUnit.cpp b/src/sbbs3/ctrl/FtpCfgDlgUnit.cpp index 69a09530316b17df03187d3c8f4c70766fb0d108..b87b2646251a04a95fe991a85906936f2b14fad5 100644 --- a/src/sbbs3/ctrl/FtpCfgDlgUnit.cpp +++ b/src/sbbs3/ctrl/FtpCfgDlgUnit.cpp @@ -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) } //--------------------------------------------------------------------------- + diff --git a/src/sbbs3/ctrl/FtpCfgDlgUnit.dfm b/src/sbbs3/ctrl/FtpCfgDlgUnit.dfm index cf8f98da2862b011b675371da86d1d143f4d0533..1e0b4f795e456d2ed9437afb399da627444cb5d5 100644 --- a/src/sbbs3/ctrl/FtpCfgDlgUnit.dfm +++ b/src/sbbs3/ctrl/FtpCfgDlgUnit.dfm @@ -17,7 +17,7 @@ object FtpCfgDlg: TFtpCfgDlg Top = 4 Width = 342 Height = 245 - ActivePage = IndexTabSheet + ActivePage = SoundTabSheet TabOrder = 0 object GeneralTabSheet: TTabSheet Caption = 'General' @@ -296,7 +296,7 @@ object FtpCfgDlg: TFtpCfgDlg AutoSize = False Caption = 'Connect' end - object HnagupSoundLabel: TLabel + object HangupSoundLabel: 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 diff --git a/src/sbbs3/ctrl/FtpCfgDlgUnit.h b/src/sbbs3/ctrl/FtpCfgDlgUnit.h index 9c048dd31c6e539746b47b3ce750b9895655de50..b8a218728bcbba8d3e3cfdf6f1775357767ce435 100644 --- a/src/sbbs3/ctrl/FtpCfgDlgUnit.h +++ b/src/sbbs3/ctrl/FtpCfgDlgUnit.h @@ -66,7 +66,7 @@ __published: TLabel *AnswerSoundLabel; TEdit *AnswerSoundEdit; TButton *AnswerSoundButton; - TLabel *HnagupSoundLabel; + TLabel *HangupSoundLabel; 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);