Skip to content
Snippets Groups Projects
Commit e5121153 authored by Rob Swindell's avatar Rob Swindell :speech_balloon:
Browse files

Merge branch 'master' of gitlab.synchro.net:sbbs/sbbs

parents be4a88fa a2f5990b
No related branches found
No related tags found
1 merge request!463MRC mods by Codefenix (2024-10-20)
Pipeline #112 passed
...@@ -262,6 +262,7 @@ void __fastcall TConfigWizard::FormShow(TObject *Sender) ...@@ -262,6 +262,7 @@ void __fastcall TConfigWizard::FormShow(TObject *Sender)
DateUsRadioButton->Checked=true; DateUsRadioButton->Checked=true;
WizNotebook->PageIndex=0; WizNotebook->PageIndex=0;
ProgressBar->Position=0;
ProgressBar->Max=WizNotebook->Pages->Count-1; ProgressBar->Max=WizNotebook->Pages->Count-1;
IllegalCharsLabel->Caption="Illegal characters: '" IllegalCharsLabel->Caption="Illegal characters: '"
ILLEGAL_QWKID_CHARS "'"; ILLEGAL_QWKID_CHARS "'";
...@@ -323,14 +324,12 @@ void __fastcall TConfigWizard::NextButtonClick(TObject *Sender) ...@@ -323,14 +324,12 @@ void __fastcall TConfigWizard::NextButtonClick(TObject *Sender)
scfg.sys_misc|=SM_SYSVDELM; scfg.sys_misc|=SM_SYSVDELM;
scfg.sys_misc&=~SM_USRVDELM; scfg.sys_misc&=~SM_USRVDELM;
} }
scfg.new_install=FALSE; scfg.new_install=FALSE;
if(!save_cfg(&scfg,0)) { if(!save_cfg(&scfg,0)) {
Application->MessageBox("Error saving configuration" Application->MessageBox("Error saving configuration"
,"ERROR",MB_OK|MB_ICONEXCLAMATION); ,"ERROR",MB_OK|MB_ICONEXCLAMATION);
} else } else
refresh_cfg(&scfg); refresh_cfg(&scfg);
Close(); Close();
return; return;
} }
......
...@@ -1682,9 +1682,15 @@ void __fastcall TMainForm::StartupTimerTick(TObject *Sender) ...@@ -1682,9 +1682,15 @@ void __fastcall TMainForm::StartupTimerTick(TObject *Sender)
int WebFormPage=PAGE_LOWERRIGHT; int WebFormPage=PAGE_LOWERRIGHT;
int ServicesFormPage=PAGE_LOWERRIGHT; int ServicesFormPage=PAGE_LOWERRIGHT;
AnsiString Str; StartupTimer->Enabled = false;
if(Initialized) { // second time (fresh install)
delete StartupTimer; delete StartupTimer;
BBSConfigWizardMenuItemClick(Sender);
DisplayMainPanels(Sender);
return;
}
AnsiString Str;
// Read Registry keys // Read Registry keys
TRegistry* Registry=new TRegistry; TRegistry* Registry=new TRegistry;
...@@ -1916,10 +1922,10 @@ void __fastcall TMainForm::StartupTimerTick(TObject *Sender) ...@@ -1916,10 +1922,10 @@ void __fastcall TMainForm::StartupTimerTick(TObject *Sender)
else else
FtpLogFile=true; FtpLogFile=true;
Registry->CloseKey();
delete Registry;
FILE* fp; FILE* fp;
if((!Registry->ValueExists("SysAutoStart")
|| (Registry->ValueExists("Imported") && Registry->ReadBool("Imported")))
&& ini_file[0]) {
if((fp=fopen(ini_file,"r"))==NULL) { if((fp=fopen(ini_file,"r"))==NULL) {
char err[MAX_PATH*2]; char err[MAX_PATH*2];
sprintf(err,"Error %d opening initialization file: %s",errno,ini_file); sprintf(err,"Error %d opening initialization file: %s",errno,ini_file);
...@@ -1938,242 +1944,6 @@ void __fastcall TMainForm::StartupTimerTick(TObject *Sender) ...@@ -1938,242 +1944,6 @@ void __fastcall TMainForm::StartupTimerTick(TObject *Sender)
StatusBar->Panels->Items[STATUSBAR_LAST_PANEL]->Text="Read " + AnsiString(ini_file); StatusBar->Panels->Items[STATUSBAR_LAST_PANEL]->Text="Read " + AnsiString(ini_file);
fclose(fp); fclose(fp);
} else { /* Legacy (v3.10-3.11) */
if(Registry->ValueExists("SysAutoStart"))
SysAutoStart=Registry->ReadInteger("SysAutoStart");
else
SysAutoStart=true;
if(Registry->ValueExists("MailAutoStart"))
MailAutoStart=Registry->ReadInteger("MailAutoStart");
else
MailAutoStart=true;
if(Registry->ValueExists("FtpAutoStart"))
FtpAutoStart=Registry->ReadInteger("FtpAutoStart");
else
FtpAutoStart=true;
if(Registry->ValueExists("WebAutoStart"))
WebAutoStart=Registry->ReadInteger("WebAutoStart");
else
WebAutoStart=true;
if(Registry->ValueExists("ServicesAutoStart"))
ServicesAutoStart=Registry->ReadInteger("ServicesAutoStart");
else
ServicesAutoStart=true;
if(Registry->ValueExists("Hostname"))
SAFECOPY(global.host_name,Registry->ReadString("Hostname").c_str());
if(Registry->ValueExists("CtrlDirectory"))
SAFECOPY(global.ctrl_dir,Registry->ReadString("CtrlDirectory").c_str());
if(Registry->ValueExists("TempDirectory"))
SAFECOPY(global.temp_dir,Registry->ReadString("TempDirectory").c_str());
if(Registry->ValueExists("SemFileCheckFrequency"))
global.sem_chk_freq=Registry->ReadInteger("SemFileCheckFrequency");
/* JavaScript Operating Parameters */
if(Registry->ValueExists("JS_MaxBytes"))
global.js.max_bytes=Registry->ReadInteger("JS_MaxBytes");
if(global.js.max_bytes==0)
global.js.max_bytes=JAVASCRIPT_MAX_BYTES;
if(Registry->ValueExists("JS_ContextStack"))
global.js.cx_stack=Registry->ReadInteger("JS_ContextStack");
if(global.js.cx_stack==0)
global.js.cx_stack=JAVASCRIPT_CONTEXT_STACK;
if(Registry->ValueExists("JS_GcInterval"))
global.js.gc_interval=Registry->ReadInteger("JS_GcInterval");
if(Registry->ValueExists("JS_YieldInterval"))
global.js.yield_interval=Registry->ReadInteger("JS_YieldInterval");
/*
if(Registry->ValueExists("TelnetInterface"))
bbs_startup.telnet_interface=Registry->ReadInteger("TelnetInterface");
if(Registry->ValueExists("RLoginInterface"))
bbs_startup.rlogin_interface=Registry->ReadInteger("RLoginInterface");
*/
if(Registry->ValueExists("TelnetPort"))
bbs_startup.telnet_port=Registry->ReadInteger("TelnetPort");
if(Registry->ValueExists("RLoginPort"))
bbs_startup.rlogin_port=Registry->ReadInteger("RLoginPort");
if(Registry->ValueExists("FirstNode"))
bbs_startup.first_node=Registry->ReadInteger("FirstNode");
if(Registry->ValueExists("LastNode"))
bbs_startup.last_node=Registry->ReadInteger("LastNode");
if(Registry->ValueExists("OutbufHighwaterMark"))
bbs_startup.outbuf_highwater_mark=Registry->ReadInteger("OutbufHighwaterMark");
else
bbs_startup.outbuf_highwater_mark=1024;
if(Registry->ValueExists("OutbufDrainTimeout"))
bbs_startup.outbuf_drain_timeout=Registry->ReadInteger("OutbufDrainTimeout");
else
bbs_startup.outbuf_drain_timeout=10;
if(Registry->ValueExists("AnswerSound"))
SAFECOPY(bbs_startup.answer_sound
,Registry->ReadString("AnswerSound").c_str());
if(Registry->ValueExists("HangupSound"))
SAFECOPY(bbs_startup.hangup_sound
,Registry->ReadString("HangupSound").c_str());
if(Registry->ValueExists("StartupOptions"))
bbs_startup.options=Registry->ReadInteger("StartupOptions");
if(Registry->ValueExists("MailMaxClients"))
mail_startup.max_clients=Registry->ReadInteger("MailMaxClients");
if(Registry->ValueExists("MailMaxInactivity"))
mail_startup.max_inactivity=Registry->ReadInteger("MailMaxInactivity");
/*
if(Registry->ValueExists("MailInterface"))
mail_startup.interface_addr=Registry->ReadInteger("MailInterface");
*/
if(Registry->ValueExists("MailMaxDeliveryAttempts"))
mail_startup.max_delivery_attempts
=Registry->ReadInteger("MailMaxDeliveryAttempts");
if(Registry->ValueExists("MailRescanFrequency"))
mail_startup.rescan_frequency
=Registry->ReadInteger("MailRescanFrequency");
if(Registry->ValueExists("MailLinesPerYield"))
mail_startup.lines_per_yield
=Registry->ReadInteger("MailLinesPerYield");
if(Registry->ValueExists("MailMaxRecipients"))
mail_startup.max_recipients
=Registry->ReadInteger("MailMaxRecipients");
if(Registry->ValueExists("MailMaxMsgSize"))
mail_startup.max_msg_size
=Registry->ReadInteger("MailMaxMsgSize");
if(Registry->ValueExists("MailSMTPPort"))
mail_startup.smtp_port=Registry->ReadInteger("MailSMTPPort");
if(Registry->ValueExists("MailPOP3Port"))
mail_startup.pop3_port=Registry->ReadInteger("MailPOP3Port");
if(Registry->ValueExists("MailRelayServer"))
SAFECOPY(mail_startup.relay_server
,Registry->ReadString("MailRelayServer").c_str());
if(Registry->ValueExists("MailRelayPort"))
mail_startup.relay_port=Registry->ReadInteger("MailRelayPort");
if(Registry->ValueExists("MailDefaultUser"))
SAFECOPY(mail_startup.default_user
,Registry->ReadString("MailDefaultUser").c_str());
if(Registry->ValueExists("MailDNSBlacklistSubject"))
SAFECOPY(mail_startup.dnsbl_tag
,Registry->ReadString("MailDNSBlacklistSubject").c_str());
else
SAFECOPY(mail_startup.dnsbl_tag,"SPAM");
if(Registry->ValueExists("MailDNSBlacklistHeader"))
SAFECOPY(mail_startup.dnsbl_hdr
,Registry->ReadString("MailDNSBlacklistHeader").c_str());
else
SAFECOPY(mail_startup.dnsbl_hdr,"X-DNSBL");
if(Registry->ValueExists("MailDNSServer"))
SAFECOPY(mail_startup.dns_server
,Registry->ReadString("MailDNSServer").c_str());
if(Registry->ValueExists("MailInboundSound"))
SAFECOPY(mail_startup.inbound_sound
,Registry->ReadString("MailInboundSound").c_str());
if(Registry->ValueExists("MailOutboundSound"))
SAFECOPY(mail_startup.outbound_sound
,Registry->ReadString("MailOutboundSound").c_str());
if(Registry->ValueExists("MailPOP3Sound"))
SAFECOPY(mail_startup.pop3_sound
,Registry->ReadString("MailPOP3Sound").c_str());
if(Registry->ValueExists("MailOptions"))
mail_startup.options=Registry->ReadInteger("MailOptions");
if(Registry->ValueExists("FtpMaxClients"))
ftp_startup.max_clients=Registry->ReadInteger("FtpMaxClients");
if(Registry->ValueExists("FtpMaxInactivity"))
ftp_startup.max_inactivity=Registry->ReadInteger("FtpMaxInactivity");
if(Registry->ValueExists("FtpQwkTimeout"))
ftp_startup.qwk_timeout=Registry->ReadInteger("FtpQwkTimeout");
/*
if(Registry->ValueExists("FtpInterface"))
ftp_startup.interface_addr=Registry->ReadInteger("FtpInterface");
*/
if(Registry->ValueExists("FtpPort"))
ftp_startup.port=Registry->ReadInteger("FtpPort");
if(Registry->ValueExists("FtpAnswerSound"))
SAFECOPY(ftp_startup.answer_sound
,Registry->ReadString("FtpAnswerSound").c_str());
if(Registry->ValueExists("FtpHangupSound"))
SAFECOPY(ftp_startup.hangup_sound
,Registry->ReadString("FtpHangupSound").c_str());
if(Registry->ValueExists("FtpHackAttemptSound"))
SAFECOPY(ftp_startup.hack_sound
,Registry->ReadString("FtpHackAttemptSound").c_str());
if(Registry->ValueExists("FtpIndexFileName"))
SAFECOPY(ftp_startup.index_file_name
,Registry->ReadString("FtpIndexFileName").c_str());
if(Registry->ValueExists("FtpHtmlIndexFile"))
SAFECOPY(ftp_startup.html_index_file
,Registry->ReadString("FtpHtmlIndexFile").c_str());
if(Registry->ValueExists("FtpHtmlIndexScript"))
SAFECOPY(ftp_startup.html_index_script
,Registry->ReadString("FtpHtmlIndexScript").c_str());
if(Registry->ValueExists("FtpOptions"))
ftp_startup.options=Registry->ReadInteger("FtpOptions");
/*
if(Registry->ValueExists("ServicesInterface"))
services_startup.interface_addr
=Registry->ReadInteger("ServicesInterface");
*/
if(Registry->ValueExists("ServicesAnswerSound"))
SAFECOPY(services_startup.answer_sound
,Registry->ReadString("ServicesAnswerSound").c_str());
if(Registry->ValueExists("ServicesHangupSound"))
SAFECOPY(services_startup.hangup_sound
,Registry->ReadString("ServicesHangupSound").c_str());
if(Registry->ValueExists("ServicesOptions"))
services_startup.options=Registry->ReadInteger("ServicesOptions");
if(SaveIniSettings(Sender))
Registry->WriteBool("Imported",true); /* Use the .ini file for these settings from now on */
}
Registry->CloseKey();
delete Registry;
AnsiString CtrlDirectory = AnsiString(global.ctrl_dir); AnsiString CtrlDirectory = AnsiString(global.ctrl_dir);
if(!FileExists(CtrlDirectory+"MAIN.CNF")) { if(!FileExists(CtrlDirectory+"MAIN.CNF")) {
Application->CreateForm(__classid(TCtrlPathDialog), &CtrlPathDialog); Application->CreateForm(__classid(TCtrlPathDialog), &CtrlPathDialog);
...@@ -2203,6 +1973,25 @@ void __fastcall TMainForm::StartupTimerTick(TObject *Sender) ...@@ -2203,6 +1973,25 @@ void __fastcall TMainForm::StartupTimerTick(TObject *Sender)
} }
StatusBar->Panels->Items[STATUSBAR_LAST_PANEL]->Text="Configuration loaded"; StatusBar->Panels->Items[STATUSBAR_LAST_PANEL]->Text="Configuration loaded";
if(!NodeFormFloating)
NodeForm->ManualDock(PageControl(NodeFormPage),NULL,alClient);
if(!ClientFormFloating)
ClientForm->ManualDock(PageControl(ClientFormPage),NULL,alClient);
if(!StatsFormFloating)
StatsForm->ManualDock(PageControl(StatsFormPage),NULL,alClient);
if(!MailFormFloating)
MailForm->ManualDock(PageControl(MailFormPage),NULL,alClient);
if(!TelnetFormFloating)
TelnetForm->ManualDock(PageControl(TelnetFormPage),NULL,alClient);
if(!EventsFormFloating)
EventsForm->ManualDock(PageControl(EventsFormPage),NULL,alClient);
if(!ServicesFormFloating)
ServicesForm->ManualDock(PageControl(ServicesFormPage),NULL,alClient);
if(!FtpFormFloating)
FtpForm->ManualDock(PageControl(FtpFormPage),NULL,alClient);
if(!WebFormFloating)
WebForm->ManualDock(PageControl(WebFormPage),NULL,alClient);
recycle_semfiles=semfile_list_init(cfg.ctrl_dir,"recycle","ctrl"); recycle_semfiles=semfile_list_init(cfg.ctrl_dir,"recycle","ctrl");
semfile_list_add(&recycle_semfiles,ini_file); semfile_list_add(&recycle_semfiles,ini_file);
semfile_list_check(&initialized,recycle_semfiles); semfile_list_check(&initialized,recycle_semfiles);
...@@ -2212,13 +2001,16 @@ void __fastcall TMainForm::StartupTimerTick(TObject *Sender) ...@@ -2212,13 +2001,16 @@ void __fastcall TMainForm::StartupTimerTick(TObject *Sender)
if(cfg.new_install) { if(cfg.new_install) {
Application->BringToFront(); Application->BringToFront();
for(int i=0;i<10;i++) { StartupTimer->Interval = 2500; // Let 'em see the logo for a bit
Application->ProcessMessages(); StartupTimer->Enabled = true;
Sleep(300); // Let 'em see the logo for a bit } else {
DisplayMainPanels(Sender);
} }
BBSConfigWizardMenuItemClick(Sender); Initialized=true;
} }
void __fastcall TMainForm::DisplayMainPanels(TObject* Sender)
{
if(bbs_startup.options&BBS_OPT_MUTE) if(bbs_startup.options&BBS_OPT_MUTE)
SoundToggle->Checked=false; SoundToggle->Checked=false;
else else
...@@ -2229,25 +2021,6 @@ void __fastcall TMainForm::StartupTimerTick(TObject *Sender) ...@@ -2229,25 +2021,6 @@ void __fastcall TMainForm::StartupTimerTick(TObject *Sender)
else else
ChatToggle->Checked=false; ChatToggle->Checked=false;
if(!NodeFormFloating)
NodeForm->ManualDock(PageControl(NodeFormPage),NULL,alClient);
if(!ClientFormFloating)
ClientForm->ManualDock(PageControl(ClientFormPage),NULL,alClient);
if(!StatsFormFloating)
StatsForm->ManualDock(PageControl(StatsFormPage),NULL,alClient);
if(!MailFormFloating)
MailForm->ManualDock(PageControl(MailFormPage),NULL,alClient);
if(!TelnetFormFloating)
TelnetForm->ManualDock(PageControl(TelnetFormPage),NULL,alClient);
if(!EventsFormFloating)
EventsForm->ManualDock(PageControl(EventsFormPage),NULL,alClient);
if(!ServicesFormFloating)
ServicesForm->ManualDock(PageControl(ServicesFormPage),NULL,alClient);
if(!FtpFormFloating)
FtpForm->ManualDock(PageControl(FtpFormPage),NULL,alClient);
if(!WebFormFloating)
WebForm->ManualDock(PageControl(WebFormPage),NULL,alClient);
NodeForm->Show(); NodeForm->Show();
ClientForm->Show(); ClientForm->Show();
StatsForm->Show(); StatsForm->Show();
...@@ -2320,9 +2093,8 @@ void __fastcall TMainForm::StartupTimerTick(TObject *Sender) ...@@ -2320,9 +2093,8 @@ void __fastcall TMainForm::StartupTimerTick(TObject *Sender)
if(!Application->Active) /* Starting up minimized? */ if(!Application->Active) /* Starting up minimized? */
FormMinimize(Sender); /* Put icon in systray */ FormMinimize(Sender); /* Put icon in systray */
Initialized=true;
} }
//--------------------------------------------------------------------------- //---------------------------------------------------------------------------
void __fastcall TMainForm::SaveRegistrySettings(TObject* Sender) void __fastcall TMainForm::SaveRegistrySettings(TObject* Sender)
{ {
...@@ -3320,17 +3092,17 @@ void __fastcall TMainForm::RestoreTrayMenuItemClick(TObject *Sender) ...@@ -3320,17 +3092,17 @@ void __fastcall TMainForm::RestoreTrayMenuItemClick(TObject *Sender)
//--------------------------------------------------------------------------- //---------------------------------------------------------------------------
void __fastcall TMainForm::BBSConfigWizardMenuItemClick(TObject *Sender) void __fastcall TMainForm::BBSConfigWizardMenuItemClick(TObject *Sender)
{ {
static TConfigWizard* ConfigWizard; TConfigWizard* ConfigWizard;
static inside; static inside;
if(inside) return; if(inside) return;
inside=true; inside=true;
if(ConfigWizard == NULL)
Application->CreateForm(__classid(TConfigWizard), &ConfigWizard); Application->CreateForm(__classid(TConfigWizard), &ConfigWizard);
if(ConfigWizard->ShowModal()==mrOk) { if(ConfigWizard->ShowModal()==mrOk) {
SaveSettings(Sender); SaveSettings(Sender);
// ReloadConfigExecute(Sender); /* unnecessary since refresh_cfg() is already called */ // ReloadConfigExecute(Sender); /* unnecessary since refresh_cfg() is already called */
} }
delete ConfigWizard;
inside=false; inside=false;
} }
......
...@@ -492,6 +492,7 @@ public: // User declarations ...@@ -492,6 +492,7 @@ public: // User declarations
TPageControl* __fastcall PageControl(int num); TPageControl* __fastcall PageControl(int num);
int __fastcall PageNum(TPageControl* obj); int __fastcall PageNum(TPageControl* obj);
void __fastcall FormMinimize(TObject *Sender); void __fastcall FormMinimize(TObject *Sender);
void __fastcall DisplayMainPanels(TObject *Sender);
TColor __fastcall ReadColor(TRegistry*, AnsiString); TColor __fastcall ReadColor(TRegistry*, AnsiString);
void __fastcall WriteColor(TRegistry*, AnsiString, TColor); void __fastcall WriteColor(TRegistry*, AnsiString, TColor);
void __fastcall ReadFont(AnsiString, TFont*); void __fastcall ReadFont(AnsiString, TFont*);
......
...@@ -91,11 +91,15 @@ bool sbbs_t::email(int usernumber, const char *top, const char *subj, long mode, ...@@ -91,11 +91,15 @@ bool sbbs_t::email(int usernumber, const char *top, const char *subj, long mode,
bputs(text[UnknownUser]); bputs(text[UnknownUser]);
return(false); return(false);
} }
if((l&NETMAIL) && (cfg.sys_misc&SM_FWDTONET) && !(mode & WM_NOFWD)) { if((l&NETMAIL) && (cfg.sys_misc&SM_FWDTONET) && !(mode & WM_NOFWD) && !(useron.rest&FLAG('M'))) {
getuserrec(&cfg,usernumber,U_NETMAIL,LEN_NETMAIL,str); getuserrec(&cfg,usernumber,U_NETMAIL,LEN_NETMAIL,str);
if(is_supported_netmail_addr(&cfg, str)) {
bprintf(text[UserNetMail],str); bprintf(text[UserNetMail],str);
if((mode & WM_FORCEFWD) || text[ForwardMailQ][0]==0 || yesno(text[ForwardMailQ])) /* Forward to netmail address */ if((mode & WM_FORCEFWD) || yesno(text[ForwardMailQ])) /* Forward to netmail address */
return(netmail(str, subj, mode, resmb, remsg)); return(netmail(str, subj, mode, resmb, remsg));
} else {
bprintf(text[InvalidNetMailAddr], str);
}
} }
if(sys_status&SS_ABORT) { if(sys_status&SS_ABORT) {
bputs(text[Aborted]); bputs(text[Aborted]);
......
...@@ -1428,3 +1428,23 @@ bool sbbs_t::qnetmail(const char *into, const char *subj, long mode, smb_t* resm ...@@ -1428,3 +1428,23 @@ bool sbbs_t::qnetmail(const char *into, const char *subj, long mode, smb_t* resm
logline("EN",str); logline("EN",str);
return(true); return(true);
} }
extern "C" BOOL is_supported_netmail_addr(scfg_t* cfg, const char* addr)
{
switch (smb_netaddr_type(addr)) {
case NET_FIDO:
return INT_TO_BOOL(cfg->total_faddrs && (cfg->netmail_misc&NMAIL_ALLOW));
case NET_INTERNET:
return INT_TO_BOOL(cfg->inetmail_misc&NMAIL_ALLOW);
case NET_QWK:
{
char fulladdr[256] = "";
const char* p = strchr(addr, '@');
if(p == NULL)
return FALSE;
qwk_route(cfg, p + 1, fulladdr, sizeof(fulladdr)-1);
return fulladdr[0] != 0;
}
}
return FALSE;
}
...@@ -152,7 +152,26 @@ BOOL sbbs_t::newuser() ...@@ -152,7 +152,26 @@ BOOL sbbs_t::newuser()
} else } else
useron.misc&=~AUTOTERM; useron.misc&=~AUTOTERM;
if(!(useron.misc&AUTOTERM)) { while(text[HitYourBackspaceKey][0] && !(useron.misc&(PETSCII|SWAP_DELETE)) && online) {
bputs(text[HitYourBackspaceKey]);
uchar key = getkey(K_NONE);
bprintf(text[CharacterReceivedFmt], key, key);
if(key == '\b')
break;
if(key == DEL) {
if(text[SwapDeleteKeyQ][0] == 0 || yesno(text[SwapDeleteKeyQ]))
useron.misc |= SWAP_DELETE;
}
else if(key == PETSCII_DELETE)
useron.misc |= (PETSCII|COLOR);
else {
bprintf(text[InvalidBackspaceKeyFmt], key, key);
if(text[ContinueQ][0] && !yesno(text[ContinueQ]))
return FALSE;
}
}
if(!(useron.misc&(AUTOTERM|PETSCII))) {
if(text[AnsiTerminalQ][0] && yesno(text[AnsiTerminalQ])) if(text[AnsiTerminalQ][0] && yesno(text[AnsiTerminalQ]))
useron.misc|=ANSI; useron.misc|=ANSI;
else else
...@@ -173,25 +192,6 @@ BOOL sbbs_t::newuser() ...@@ -173,25 +192,6 @@ BOOL sbbs_t::newuser()
else else
useron.rows = TERM_ROWS_DEFAULT; useron.rows = TERM_ROWS_DEFAULT;
while(text[HitYourBackspaceKey][0] && !(useron.misc&(PETSCII|SWAP_DELETE)) && online) {
bputs(text[HitYourBackspaceKey]);
uchar key = getkey(K_NONE);
bprintf(text[CharacterReceivedFmt], key, key);
if(key == '\b')
break;
if(key == DEL) {
if(text[SwapDeleteKeyQ][0] == 0 || yesno(text[SwapDeleteKeyQ]))
useron.misc |= SWAP_DELETE;
}
else if(key == PETSCII_DELETE)
useron.misc |= (AUTOTERM|PETSCII|COLOR);
else {
bprintf(text[InvalidBackspaceKeyFmt], key, key);
if(text[ContinueQ][0] && !yesno(text[ContinueQ]))
return FALSE;
}
}
if(useron.misc&PETSCII) { if(useron.misc&PETSCII) {
autoterm |= PETSCII; autoterm |= PETSCII;
outcom(PETSCII_UPPERLOWER); outcom(PETSCII_UPPERLOWER);
...@@ -328,10 +328,10 @@ BOOL sbbs_t::newuser() ...@@ -328,10 +328,10 @@ BOOL sbbs_t::newuser()
&& !trashcan(useron.netmail,"email")) && !trashcan(useron.netmail,"email"))
break; break;
} }
if(useron.netmail[0] && cfg.sys_misc&SM_FWDTONET && text[ForwardMailQ][0] && yesno(text[ForwardMailQ]))
useron.misc|=NETMAIL;
else
useron.misc&=~NETMAIL; useron.misc&=~NETMAIL;
if((cfg.sys_misc&SM_FWDTONET) && is_supported_netmail_addr(&cfg, useron.netmail) && yesno(text[ForwardMailQ]))
useron.misc|=NETMAIL;
if(text[UserInfoCorrectQ][0]==0 || yesno(text[UserInfoCorrectQ])) if(text[UserInfoCorrectQ][0]==0 || yesno(text[UserInfoCorrectQ]))
break; break;
} }
......
...@@ -1294,6 +1294,9 @@ extern "C" { ...@@ -1294,6 +1294,9 @@ extern "C" {
/* qwk.cpp */ /* qwk.cpp */
DLLEXPORT int qwk_route(scfg_t*, const char *inaddr, char *fulladdr, size_t maxlen); DLLEXPORT int qwk_route(scfg_t*, const char *inaddr, char *fulladdr, size_t maxlen);
/* netmail.cpp */
DLLEXPORT BOOL is_supported_netmail_addr(scfg_t*, const char* addr);
/* con_out.cpp */ /* con_out.cpp */
unsigned char cp437_to_petscii(unsigned char); unsigned char cp437_to_petscii(unsigned char);
......
...@@ -1082,11 +1082,9 @@ void sbbs_t::maindflts(user_t* user) ...@@ -1082,11 +1082,9 @@ void sbbs_t::maindflts(user_t* user)
if(sys_status&SS_ABORT) if(sys_status&SS_ABORT)
break; break;
putuserrec(&cfg,user->number,U_NETMAIL,LEN_NETMAIL,user->netmail); putuserrec(&cfg,user->number,U_NETMAIL,LEN_NETMAIL,user->netmail);
if(user->netmail[0] == 0 || noyes(text[ForwardMailQ]))
user->misc &= ~NETMAIL; user->misc &= ~NETMAIL;
else { if(is_supported_netmail_addr(&cfg, user->netmail) && !noyes(text[ForwardMailQ]))
user->misc |= NETMAIL; user->misc |= NETMAIL;
}
putuserrec(&cfg,user->number,U_MISC,8,ultoa(user->misc,str,16)); putuserrec(&cfg,user->number,U_MISC,8,ultoa(user->misc,str,16));
break; break;
case 'C': case 'C':
......
...@@ -10,7 +10,7 @@ ...@@ -10,7 +10,7 @@
w Synchronet BBS for @PLATFORM@ - Version @FULL_VER@ w Synchronet BBS for @PLATFORM@ - Version @FULL_VER@
w @COPYRIGHT@ - http://www.synchro.net w @COPYRIGHT@ - http://www.synchro.net
gh gh
32-bit Multi-threaded Bulletin Board System Software for the Internet Age Native Multi-threaded Bulletin Board System Software for the Internet Age
ng ng
Integrated TCP/IP Servers: hong Telnet/RLogin/SSH Integrated TCP/IP Servers: hong Telnet/RLogin/SSH
hong SMTP/POP3 (inbound and outbound e-mail) hong SMTP/POP3 (inbound and outbound e-mail)
...@@ -19,7 +19,7 @@ Integrated TCP/IP Servers: hong Telnet/RLogin/SSH ...@@ -19,7 +19,7 @@ Integrated TCP/IP Servers: hong Telnet/RLogin/SSH
hong Web (HTTP with server-side JavaScript and CGI) hong Web (HTTP with server-side JavaScript and CGI)
hong Finger, Gopher, and IRC hong Finger, Gopher, and IRC
h h
Native versions for Win32 and Unix (e.g. Linux, FreeBSD, and OpenBSD) platforms Native versions for Win32 and Unix-like (e.g. Linux and FreeBSD) platforms
n@CLS@----------------------------------------------------------------------------- n@CLS@-----------------------------------------------------------------------------
hRemembering these keys will help you enjoy your cSynchronetw Telnet experience: hRemembering these keys will help you enjoy your cSynchronetw Telnet experience:
n----------------------------------------------------------------------------- n-----------------------------------------------------------------------------
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment