Skip to content
Snippets Groups Projects
Commit 98a254d5 authored by rswindell's avatar rswindell
Browse files

Added BBS option to enable/disable the sending of Telnet Go-ahead commands

(defaults to 'off', previously always-on).
parent 66f5060e
No related branches found
No related tags found
No related merge requests found
......@@ -21,7 +21,7 @@ ExternalYield=10
AnswerSound=
HangupSound=
; Supported options (separated with |):
; KEEP_ALIVE
; SEND_TELNET_GA
; XTRN_MINIMIZED
; AUTO_LOGON
; DEBUG_TELNET
......
......@@ -6,7 +6,7 @@
* @format.tab-size 4 (Plain Text/Source Code File Header) *
* @format.use-tabs true (see http://www.synchro.net/ptsc_hdr.html) *
* *
* Copyright 2000 Rob Swindell - http://www.synchro.net/copyright.html *
* Copyright 2003 Rob Swindell - http://www.synchro.net/copyright.html *
* *
* This program is free software; you can redistribute it and/or *
* modify it under the terms of the GNU General Public License *
......@@ -88,7 +88,7 @@ void __fastcall TTelnetCfgDlg::FormShow(TObject *Sender)
AnswerSoundEdit->Text=AnsiString(MainForm->bbs_startup.answer_sound);
HangupSoundEdit->Text=AnsiString(MainForm->bbs_startup.hangup_sound);
CmdLogCheckBox->Checked=MainForm->bbs_startup.options&BBS_OPT_DEBUG_TELNET;
KeepAliveCheckBox->Checked=MainForm->bbs_startup.options&BBS_OPT_KEEP_ALIVE;
TelnetGaCheckBox->Checked=MainForm->bbs_startup.options&BBS_OPT_SEND_TELNET_GA;
XtrnMinCheckBox->Checked=MainForm->bbs_startup.options&BBS_OPT_XTRN_MINIMIZED;
AutoLogonCheckBox->Checked=MainForm->bbs_startup.options&BBS_OPT_AUTO_LOGON;
HostnameCheckBox->Checked
......@@ -164,10 +164,10 @@ void __fastcall TTelnetCfgDlg::OKBtnClick(TObject *Sender)
,AnswerSoundEdit->Text.c_str());
SAFECOPY(MainForm->bbs_startup.hangup_sound
,HangupSoundEdit->Text.c_str());
if(KeepAliveCheckBox->Checked==true)
MainForm->bbs_startup.options|=BBS_OPT_KEEP_ALIVE;
if(TelnetGaCheckBox->Checked==true)
MainForm->bbs_startup.options|=BBS_OPT_SEND_TELNET_GA;
else
MainForm->bbs_startup.options&=~BBS_OPT_KEEP_ALIVE;
MainForm->bbs_startup.options&=~BBS_OPT_SEND_TELNET_GA;
if(XtrnMinCheckBox->Checked==true)
MainForm->bbs_startup.options|=BBS_OPT_XTRN_MINIMIZED;
else
......
......@@ -197,13 +197,15 @@ object TelnetCfgDlg: TTelnetCfgDlg
ShowHint = True
TabOrder = 0
end
object KeepAliveCheckBox: TCheckBox
object TelnetGaCheckBox: TCheckBox
Left = 9
Top = 76
Width = 144
Width = 208
Height = 26
Hint = 'Instruct WinSock to keep your dial-up connection active'
Caption = 'Send Keep-Alives'
Hint =
'Send periodic Telnet GA commands to help detect dropped connecti' +
'ons.'
Caption = 'Send Telnet Go-Aheads'
ParentShowHint = False
ShowHint = True
TabOrder = 2
......
......@@ -79,7 +79,7 @@ __published:
TEdit *TelnetInterfaceEdit;
TLabel *TelnetPortLabel;
TEdit *TelnetPortEdit;
TCheckBox *KeepAliveCheckBox;
TCheckBox *TelnetGaCheckBox;
TCheckBox *AutoLogonCheckBox;
TTabSheet *RLoginTabSheet;
TLabel *RLoginPortLabel;
......
......@@ -266,7 +266,8 @@ char sbbs_t::getkey(long mode)
RESTORELINE;
}
if(now!=last_telnet_cmd && now-timeout>=60 && !((now-timeout)%60)) {
if(startup->options&BBS_OPT_SEND_TELNET_GA
&& now!=last_telnet_cmd && now-timeout>=60 && !((now-timeout)%60)) {
// Let's make sure the socket is up
// Sending will trigger a socket d/c detection
send_telnet_cmd(TELNET_GA,0);
......
......@@ -49,6 +49,7 @@ static ini_bitdesc_t bbs_options[] = {
{ BBS_OPT_ALLOW_RLOGIN ,"ALLOW_RLOGIN" },
{ BBS_OPT_USE_2ND_RLOGIN ,"USE_2ND_RLOGIN" },
{ BBS_OPT_NO_QWK_EVENTS ,"NO_QWK_EVENTS" },
{ BBS_OPT_SEND_TELNET_GA ,"SEND_TELNET_GA" },
{ BBS_OPT_NO_HOST_LOOKUP ,"NO_HOST_LOOKUP" },
{ BBS_OPT_NO_RECYCLE ,"NO_RECYCLE" },
{ BBS_OPT_GET_IDENT ,"GET_IDENT" },
......
......@@ -104,6 +104,7 @@ typedef struct {
#define BBS_OPT_ALLOW_RLOGIN (1<<5) /* Allow logins via BSD RLogin */
#define BBS_OPT_USE_2ND_RLOGIN (1<<6) /* Use 2nd username in BSD RLogin */
#define BBS_OPT_NO_QWK_EVENTS (1<<7) /* Don't run QWK-related events */
#define BBS_OPT_SEND_TELNET_GA (1<<8) /* Send periodic Telnet go-aheads */
#define BBS_OPT_NO_HOST_LOOKUP (1<<11)
#define BBS_OPT_NO_RECYCLE (1<<27) /* Disable recycling of server */
#define BBS_OPT_GET_IDENT (1<<28) /* Get Identity (RFC 1413) */
......
......@@ -874,7 +874,8 @@ int sbbs_t::external(char* cmdline, long mode, char* startup_dir)
// Let's make sure the socket is up
// Sending will trigger a socket d/c detection
send_telnet_cmd(TELNET_GA,0);
if(startup->options&BBS_OPT_SEND_TELNET_GA)
send_telnet_cmd(TELNET_GA,0);
// Check if the node has been interrupted
getnodedat(cfg.node_num,&thisnode,0);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment