...
 
Commits (9)
......@@ -26,3 +26,4 @@ node3
node4
*.?.cnf
ctrl/recycle
exec/*.bin
\ No newline at end of file
......@@ -31,4 +31,4 @@ all : \
.src.bin:
@baja /q $<
@baja.exe /q $<
......@@ -106,4 +106,5 @@ while (!js.terminated) {
}
frame.close();
console.clear(BG_BLACK|LIGHTGRAY);
console.creturn();
console.cleartoeol();
......@@ -505,7 +505,7 @@ const char* sbbs_t::atcode(char* sp, char* str, size_t maxlen, long* pmode, bool
return(cfg.sys_inetaddr);
if(!strcmp(sp,"HOSTNAME"))
return(startup->host_name);
return server_host_name();
if(!strcmp(sp,"FIDOADDR")) {
if(cfg.total_faddrs)
......
......@@ -117,7 +117,7 @@ bool sbbs_t::bulkmail(uchar *ar)
memset(&smb,0,sizeof(smb));
smb.subnum=INVALID_SUB; /* mail database */
i=savemsg(&cfg, &smb, &msg, &client, startup->host_name, msgbuf, /* remsg: */NULL);
i=savemsg(&cfg, &smb, &msg, &client, server_host_name(), msgbuf, /* remsg: */NULL);
free(msgbuf);
if(i!=0) {
smb_close(&smb);
......
......@@ -125,7 +125,7 @@ IncludeVerInfo=1
AutoIncBuild=1
MajorVer=3
MinorVer=18
Release=0
Release=1
Build=0
Debug=0
PreRelease=0
......@@ -138,13 +138,13 @@ CodePage=1252
[Version Info Keys]
CompanyName=Rob Swindell
FileDescription=Synchronet BBS Control Panel
FileVersion=3.18.0.0
FileVersion=3.18.1.0
InternalName=
LegalCopyright=(C) 2020 Rob Swindell
LegalTrademarks=
OriginalFilename=sbbsctrl.exe
ProductName=Synchronet BBS
ProductVersion=3.18a
ProductVersion=3.18b
Comments=
[Excluded Packages]
......
......@@ -303,7 +303,7 @@ bool sbbs_t::email(int usernumber, const char *top, const char *subj, long mode,
/* Security logging */
msg_client_hfields(&msg,&client);
smb_hfield_str(&msg,SENDERSERVER,startup->host_name);
smb_hfield_str(&msg,SENDERSERVER,server_host_name());
smb_hfield_str(&msg,SUBJECT,title);
......
......@@ -201,6 +201,11 @@ static BOOL winsock_startup(void)
#endif
static char* server_host_name(void)
{
return startup->host_name[0] ? startup->host_name : scfg.sys_inetaddr;
}
static void status(char* str)
{
if(startup!=NULL && startup->status!=NULL)
......@@ -593,7 +598,7 @@ js_initcx(JSRuntime* runtime, SOCKET sock, JSObject** glob, JSObject** ftp, js_c
break;
lprintf(LOG_DEBUG,"%04d JavaScript: Initializing System object",sock);
if(js_CreateSystemObject(js_cx, *glob, &scfg, uptime, startup->host_name, SOCKLIB_DESC)==NULL)
if(js_CreateSystemObject(js_cx, *glob, &scfg, uptime, server_host_name(), SOCKLIB_DESC)==NULL)
break;
if((*ftp=JS_DefineObject(js_cx, *glob, "ftp", NULL
......@@ -3124,7 +3129,7 @@ static void ctrl_thread(void* arg)
mswait(login_attempts*startup->login_attempt.throttle);
}
sockprintf(sock,sess,"220-%s (%s)",scfg.sys_name, startup->host_name);
sockprintf(sock,sess,"220-%s (%s)",scfg.sys_name, server_host_name());
sockprintf(sock,sess," Synchronet FTP Server %s-%s Ready"
,revision,PLATFORM_DESC);
sprintf(str,"%sftplogin.txt",scfg.text_dir);
......@@ -3850,7 +3855,7 @@ static void ctrl_thread(void* arg)
ip_addr=0;
/* TODO: IPv6 this here lookup */
if(startup->options&FTP_OPT_LOOKUP_PASV_IP
&& (host=gethostbyname(startup->host_name))!=NULL)
&& (host=gethostbyname(server_host_name()))!=NULL)
ip_addr=ntohl(*((ulong*)host->h_addr_list[0]));
if(ip_addr==0 && (ip_addr=startup->pasv_ip_addr.s_addr)==0)
ip_addr=ntohl(pasv_addr.in.sin_addr.s_addr);
......@@ -6107,9 +6112,6 @@ void DLLCALL ftp_server(void* arg)
break;
}
if(startup->host_name[0]==0)
SAFECOPY(startup->host_name,scfg.sys_inetaddr);
if((t=checktime())!=0) { /* Check binary time */
lprintf(LOG_ERR,"!TIME PROBLEM (%ld)",t);
}
......
......@@ -237,6 +237,11 @@ static BOOL winsock_startup(void)
#endif
static char* server_host_name(void)
{
return startup->host_name[0] ? startup->host_name : scfg.sys_inetaddr;
}
static void update_clients(void)
{
if(startup!=NULL && startup->clients!=NULL)
......@@ -1143,7 +1148,7 @@ static void pop3_thread(void* arg)
srand((unsigned int)(time(NULL) ^ (time_t)GetCurrentThreadId())); /* seed random number generator */
rand(); /* throw-away first result */
safe_snprintf(challenge,sizeof(challenge),"<%x%x%lx%lx@%.128s>"
,rand(),socket,(ulong)time(NULL),(ulong)clock(),startup->host_name);
,rand(),socket,(ulong)time(NULL),(ulong)clock(), server_host_name());
sockprintf(socket,client.protocol,session,"+OK Synchronet %s Server %s-%s Ready %s"
,client.protocol, revision,PLATFORM_DESC,challenge);
......@@ -2231,7 +2236,7 @@ js_mailproc(SOCKET sock, client_t* client, user_t* user, struct mailproc* mailpr
if(*js_glob==NULL) {
/* Global Objects (including system, js, client, Socket, MsgBase, File, User, etc. */
if(!js_CreateCommonObjects(*js_cx, &scfg, &scfg, NULL
,uptime, startup->host_name, SOCKLIB_DESC /* system */
,uptime, server_host_name(), SOCKLIB_DESC /* system */
,&js_callback /* js */
,&startup->js
,client, sock, -1 /* client */
......@@ -3181,7 +3186,7 @@ static void smtp_thread(void* arg)
/* SMTP session active: */
sockprintf(socket,client.protocol,session,"220 %s Synchronet %s Server %s-%s Ready"
,startup->host_name, client.protocol, revision, PLATFORM_DESC);
,server_host_name(), client.protocol, revision, PLATFORM_DESC);
while(1) {
rd = sockreadline(socket, client.protocol, session, buf, sizeof(buf));
if(rd<0)
......@@ -3712,7 +3717,7 @@ static void smtp_thread(void* arg)
smb_hfield_str(&msg, RECIPIENT, rcpt_name);
smb.subnum=subnum;
if((i=savemsg(&scfg, &smb, &msg, &client, startup->host_name, msgbuf, /* remsg: */NULL))!=SMB_SUCCESS) {
if((i=savemsg(&scfg, &smb, &msg, &client, server_host_name(), msgbuf, /* remsg: */NULL))!=SMB_SUCCESS) {
lprintf(LOG_WARNING,"%04d %s !ERROR %d (%s) posting message to %s (%s)"
,socket, client.protocol, i, smb.last_error, scfg.sub[subnum]->sname, smb.file);
sockprintf(socket,client.protocol,session, "452 ERROR %d (%s) posting message"
......@@ -3818,7 +3823,7 @@ static void smtp_thread(void* arg)
/* E-mail */
smb.subnum=INVALID_SUB;
/* creates message data, but no header or index records (since msg.to==NULL) */
i=savemsg(&scfg, &smb, &msg, &client, startup->host_name, msgbuf, /* remsg: */NULL);
i=savemsg(&scfg, &smb, &msg, &client, server_host_name(), msgbuf, /* remsg: */NULL);
if(smb_countattachments(&smb, &msg, msgbuf) > 0)
msg.hdr.auxattr |= MSG_MIMEATTACH;
msg.hdr.netattr |= MSG_KILLSENT;
......@@ -3877,7 +3882,7 @@ static void smtp_thread(void* arg)
,host_name,hello_name
,smtp.client_addr.addr.sa_family==AF_INET6?"IPv6: ":""
,host_ip
,startup->host_name
,server_host_name()
,server_addr.addr.sa_family==AF_INET6?"IPv6: ":""
,server_ip
,server_name
......@@ -4068,7 +4073,7 @@ static void smtp_thread(void* arg)
p=buf+4;
SKIP_WHITESPACE(p);
SAFECOPY(hello_name,p);
sockprintf(socket,client.protocol,session,"250 %s",startup->host_name);
sockprintf(socket,client.protocol,session,"250 %s",server_host_name());
esmtp=FALSE;
state=SMTP_STATE_HELO;
cmd=SMTP_CMD_NONE;
......@@ -4080,7 +4085,7 @@ static void smtp_thread(void* arg)
p=buf+4;
SKIP_WHITESPACE(p);
SAFECOPY(hello_name,p);
sockprintf(socket,client.protocol,session,"250-%s",startup->host_name);
sockprintf(socket,client.protocol,session,"250-%s",server_host_name());
sockprintf(socket,client.protocol,session,"250-AUTH PLAIN LOGIN CRAM-MD5");
sockprintf(socket,client.protocol,session,"250-SEND");
sockprintf(socket,client.protocol,session,"250-SOML");
......@@ -4209,7 +4214,7 @@ static void smtp_thread(void* arg)
}
if(!stricmp(buf,"AUTH CRAM-MD5")) {
safe_snprintf(challenge,sizeof(challenge),"<%x%x%lx%lx@%s>"
,rand(),socket,(ulong)time(NULL),(ulong)clock(),startup->host_name);
,rand(),socket,(ulong)time(NULL),(ulong)clock(),server_host_name());
#if 0
lprintf(LOG_DEBUG,"%04d SMTP CRAM-MD5 challenge: %s"
,socket,challenge);
......@@ -4300,7 +4305,7 @@ static void smtp_thread(void* arg)
continue;
}
if(!stricmp(buf,"QUIT")) {
sockprintf(socket,client.protocol,session,"221 %s Service closing transmission channel",startup->host_name);
sockprintf(socket,client.protocol,session,"221 %s Service closing transmission channel",server_host_name());
break;
}
if(!stricmp(buf,"NOOP")) {
......@@ -5104,7 +5109,7 @@ BOOL bounce(SOCKET sock, smb_t* smb, smbmsg_t* msg, char* err, BOOL immediate)
else
attempts[0]=0;
SAFEPRINTF2(str,"%s reporting delivery failure of message %s"
,startup->host_name, attempts);
,server_host_name(), attempts);
smb_hfield_str(&newmsg, SMB_COMMENT, str);
SAFEPRINTF2(str,"from %s to %s\r\n"
,msg->from
......@@ -5294,7 +5299,7 @@ static SOCKET sendmail_negotiate(CRYPT_SESSION *session, smb_t *smb, smbmsg_t *m
return INVALID_SOCKET;
}
sockprintf(sock, "SEND", *session,"EHLO %s",startup->host_name);
sockprintf(sock, "SEND", *session,"EHLO %s",server_host_name());
switch (sockgetrsp_opt(sock, "SEND", *session,"250", "STARTTLS", buf, sizeof(buf))) {
case -1:
if(startup->options&MAIL_OPT_RELAY_TX
......@@ -5305,7 +5310,7 @@ static SOCKET sendmail_negotiate(CRYPT_SESSION *session, smb_t *smb, smbmsg_t *m
mail_close_socket(&sock, session);
return INVALID_SOCKET;
}
sockprintf(sock, "SEND", *session,"HELO %s",startup->host_name);
sockprintf(sock, "SEND", *session,"HELO %s",server_host_name());
if(!sockgetrsp(sock, "SEND", *session,"250",buf,sizeof(buf))) {
SAFEPRINTF3(err,badrsp_err,server,buf,"250");
remove_msg_intransit(smb,msg);
......@@ -5371,7 +5376,7 @@ static SOCKET sendmail_negotiate(CRYPT_SESSION *session, smb_t *smb, smbmsg_t *m
continue;
}
}
sockprintf(sock,prot,*session,"EHLO %s",startup->host_name);
sockprintf(sock,prot,*session,"EHLO %s",server_host_name());
if(!sockgetrsp(sock, prot, *session,"250",buf,sizeof(buf))) {
SAFEPRINTF3(err,badrsp_err,server,buf,"220");
lprintf(LOG_INFO, "%04d SEND/TLS %s", sock, err);
......@@ -6128,9 +6133,6 @@ void DLLCALL mail_server(void* arg)
iniCloseFile(fp);
}
if(startup->host_name[0]==0)
SAFECOPY(startup->host_name,scfg.sys_inetaddr);
if((t=checktime())!=0) { /* Check binary time */
lprintf(LOG_ERR,"!TIME PROBLEM (%ld)",t);
}
......
......@@ -1284,7 +1284,7 @@ JSContext* sbbs_t::js_init(JSRuntime** runtime, JSObject** glob, const char* des
/* Global Objects (including system, js, client, Socket, MsgBase, File, User, etc. */
if(!js_CreateCommonObjects(js_cx, &scfg, &cfg, js_global_functions
,uptime, startup->host_name, SOCKLIB_DESC /* system */
,uptime, server_host_name(), SOCKLIB_DESC /* system */
,&js_callback /* js */
,&startup->js
,&client, client_socket, -1 /* client */
......@@ -3077,7 +3077,7 @@ void event_thread(void* arg)
&& (now_tm.tm_hour*60)+now_tm.tm_min>=sbbs->cfg.event[i]->time
&& (now_tm.tm_mday!=tm.tm_mday || now_tm.tm_mon!=tm.tm_mon)))
&& sbbs->cfg.event[i]->days&(1<<now_tm.tm_wday)
&& (sbbs->cfg.event[i]->mdays==0
&& (sbbs->cfg.event[i]->mdays < 2
|| sbbs->cfg.event[i]->mdays&(1<<now_tm.tm_mday))
&& (sbbs->cfg.event[i]->months==0
|| sbbs->cfg.event[i]->months&(1<<now_tm.tm_mon))))
......@@ -5095,9 +5095,6 @@ void DLLCALL bbs_thread(void* arg)
return;
}
if(startup->host_name[0]==0)
SAFECOPY(startup->host_name,scfg.sys_inetaddr);
if((t=checktime())!=0) { /* Check binary time */
lprintf(LOG_ERR,"!TIME PROBLEM (%ld)",t);
}
......
......@@ -311,7 +311,7 @@ bool sbbs_t::netmail(const char *into, const char *title, long mode, smb_t* resm
smb_t smb;
memset(&smb, 0, sizeof(smb));
smb.subnum = INVALID_SUB;
int result = savemsg(&cfg, &smb, &msg, &client, startup->host_name, buf, remsg);
int result = savemsg(&cfg, &smb, &msg, &client, server_host_name(), buf, remsg);
free(buf);
smb_close(&smb);
smb_freemsgmem(&msg);
......@@ -1120,13 +1120,13 @@ bool sbbs_t::inetmail(const char *into, const char *subj, long mode, smb_t* resm
/* Security logging */
msg_client_hfields(&msg,&client);
smb_hfield_str(&msg,SENDERSERVER,startup->host_name);
smb_hfield_str(&msg,SENDERSERVER, server_host_name());
smb_hfield_str(&msg,SUBJECT,title);
editor_info_to_msg(&msg, editor, charset);
i = savemsg(&cfg, &smb, &msg, &client, startup->host_name, msgbuf, remsg);
i = savemsg(&cfg, &smb, &msg, &client, server_host_name(), msgbuf, remsg);
free(msgbuf);
if(i!=SMB_SUCCESS) {
......@@ -1396,7 +1396,7 @@ bool sbbs_t::qnetmail(const char *into, const char *subj, long mode, smb_t* resm
/* Security logging */
msg_client_hfields(&msg,&client);
smb_hfield_str(&msg,SENDERSERVER,startup->host_name);
smb_hfield_str(&msg,SENDERSERVER, server_host_name());
smb_hfield_str(&msg,SUBJECT,title);
......
......@@ -297,7 +297,7 @@ bool sbbs_t::postmsg(uint subnum, long wm_mode, smb_t* resmb, smbmsg_t* remsg)
/* Security logging */
msg_client_hfields(&msg,&client);
smb_hfield_str(&msg,SENDERSERVER,startup->host_name);
smb_hfield_str(&msg,SENDERSERVER, server_host_name());
smb_hfield_str(&msg,SUBJECT,title);
......
......@@ -1163,7 +1163,7 @@ int sbbs_t::scanposts(uint subnum, long mode, const char *find)
/* Security logging */
msg_client_hfields(&vote, &client);
smb_hfield_str(&vote, SENDERSERVER, startup->host_name);
smb_hfield_str(&vote, SENDERSERVER, server_host_name());
if((i=votemsg(&cfg, &smb, &vote, notice, text[VoteNoticeFmt])) != SMB_SUCCESS)
errormsg(WHERE,ERR_WRITE,smb.file,i,smb.last_error);
......
......@@ -643,6 +643,7 @@ public:
bool gettimeleft_inside;
/* str.cpp */
char* server_host_name(void);
char* timestr(time_t);
char* datestr(time_t);
char timestr_output[60];
......
......@@ -50,7 +50,7 @@
/*************/
#define VERSION "3.18" /* Version: Major.minor */
#define REVISION 'a' /* Revision: lowercase letter */
#define REVISION 'b' /* Revision: lowercase letter */
#define VERSION_NUM (31800 + (tolower(REVISION)-'a'))
#define VERSION_HEX (0x31800 + (tolower(REVISION)-'a'))
......
......@@ -182,6 +182,11 @@ static BOOL winsock_startup(void)
#endif
static char* server_host_name(void)
{
return startup->host_name[0] ? startup->host_name : scfg.sys_inetaddr;
}
static ulong active_clients(void)
{
ulong i;
......@@ -824,7 +829,7 @@ js_initcx(JSRuntime* js_runtime, SOCKET sock, service_client_t* service_client,
if(!js_CreateUserObjects(js_cx, *glob, &scfg, /*user: */NULL, service_client->client, NULL, service_client->subscan))
break;
if(js_CreateSystemObject(js_cx, *glob, &scfg, uptime, startup->host_name, SOCKLIB_DESC)==NULL)
if(js_CreateSystemObject(js_cx, *glob, &scfg, uptime, server_host_name(), SOCKLIB_DESC)==NULL)
break;
if(service_client->service->js_server_props.version[0]==0) {
......@@ -1840,9 +1845,6 @@ void DLLCALL services_thread(void* arg)
return;
}
if(startup->host_name[0]==0)
SAFECOPY(startup->host_name,scfg.sys_inetaddr);
if((t=checktime())!=0) { /* Check binary time */
lprintf(LOG_ERR,"!TIME PROBLEM (%ld)",t);
}
......
......@@ -1272,3 +1272,8 @@ char* sbbs_t::age_of_posted_item(char* buf, size_t max, time_t t)
safe_snprintf(buf, max, text[AgeOfPostedItem], value, units, past);
return buf;
}
char* sbbs_t::server_host_name(void)
{
return startup->host_name[0] ? startup->host_name : cfg.sys_inetaddr;
}
......@@ -440,19 +440,19 @@ const char * const text_defaults[TOTAL_TEXT]={
,"\x0d\x0a\x44\x6f\x77\x6e\x6c\x6f\x61\x64\x20\x71\x75\x65\x75\x65\x20\x69\x73\x20\x65\x6d\x70\x74\x79\x2e\x0d\x0a" // 273 DownloadQueueIsEmpty
,"\x0d\x0a\x01\x2d\x01\x67\x01\x68\x55\x70\x6c\x6f\x61\x64\x20\x51\x75\x65\x75\x65\x3a\x01\x6e\x01\x67\x20\x20\x20\x20\x20\x20\x20"
"\x20\x44\x65\x73\x63\x72\x69\x70\x74\x69\x6f\x6e\x0d\x0a\x0d\x0a\x01\x6e" // 274 UploadQueueLstHdr
,"\x01\x67\x01\x68\x25\x32\x64\x3a\x20\x01\x6e\x01\x67\x25\x73\x20\x20\x20\x20\x20\x25\x73\x0d\x0a" // 275 UploadQueueLstFmt
,"\x01\x67\x01\x68\x25\x32\x64\x3a\x20\x01\x6e\x01\x67\x25\x2d\x31\x32\x73\x20\x20\x20\x20\x20\x25\x73\x0d\x0a" // 275 UploadQueueLstFmt
,"\x0d\x0a\x01\x2d\x01\x67\x01\x68\x44\x6f\x77\x6e\x6c\x6f\x61\x64\x20\x51\x75\x65\x75\x65\x3a\x01\x6e\x01\x67\x20\x20\x20\x20\x20"
"\x20\x43\x72\x65\x64\x69\x74\x73\x20\x20\x20\x20\x20\x20\x42\x79\x74\x65\x73\x20\x20\x20\x20\x20\x20\x20\x20\x54\x69\x6d\x65\x0d"
"\x0a\x0d\x0a\x01\x6e" // 276 DownloadQueueLstHdr
,"\x01\x67\x01\x68\x25\x32\x64\x3a\x20\x01\x6e\x01\x67\x25\x73\x20\x25\x31\x31\x2e\x31\x31\x73\x20\x25\x31\x31\x2e\x31\x31\x73\x20"
"\x20\x20\x20\x20\x25\x73\x0d\x0a" // 277 DownloadQueueLstFmt
,"\x01\x67\x01\x68\x25\x32\x64\x3a\x20\x01\x6e\x01\x67\x25\x2d\x31\x32\x73\x20\x25\x31\x31\x2e\x31\x31\x73\x20\x25\x31\x31\x2e\x31"
"\x31\x73\x20\x20\x20\x20\x20\x25\x73\x0d\x0a" // 277 DownloadQueueLstFmt
,"\x0d\x0a\x01\x77\x01\x68\x20\x20\x20\x20\x20\x20\x20\x20\x20\x54\x6f\x74\x61\x6c\x73\x3a\x20\x25\x31\x31\x2e\x31\x31\x73\x20\x25"
"\x31\x31\x2e\x31\x31\x73\x20\x20\x20\x20\x20\x25\x73\x0d\x0a" // 278 DownloadQueueTotals
,"\x0d\x0a\x01\x2d\x01\x67\x52\x65\x6d\x6f\x76\x65\x20\x77\x68\x69\x63\x68\x20\x66\x69\x6c\x65\x20\x66\x72\x6f\x6d\x20\x75\x70\x6c"
"\x6f\x61\x64\x20\x71\x75\x65\x75\x65\x20\x28\x31\x2d\x25\x64\x29\x3a\x20\x01\x6e" // 279 RemoveWhichFromUlQueue
,"\x0d\x0a\x01\x2d\x01\x67\x52\x65\x6d\x6f\x76\x65\x20\x77\x68\x69\x63\x68\x20\x66\x69\x6c\x65\x20\x66\x72\x6f\x6d\x20\x64\x6f\x77"
"\x6e\x6c\x6f\x61\x64\x20\x71\x75\x65\x75\x65\x20\x28\x31\x2d\x25\x64\x29\x3a\x20\x01\x6e" // 280 RemoveWhichFromDlQueue
,"\x0d\x0a\x55\x70\x6c\x6f\x61\x64\x20\x71\x75\x65\x75\x65\x20\x69\x73\x20\x65\x6d\x70\x74\x79\x0d\x0a" // 281 UploadQueueIsEmpty
,"\x0d\x0a\x55\x70\x6c\x6f\x61\x64\x20\x71\x75\x65\x75\x65\x20\x69\x73\x20\x65\x6d\x70\x74\x79\x2e\x0d\x0a" // 281 UploadQueueIsEmpty
,"\x0d\x0a\x48\x61\x6e\x67\x20\x75\x70\x20\x61\x66\x74\x65\x72\x20\x74\x72\x61\x6e\x73\x66\x65\x72" // 282 HangUpAfterXferQ
,"\x0d\x0a\x01\x77\x01\x68\x53\x74\x61\x72\x74\x20\x74\x72\x61\x6e\x73\x66\x65\x72\x20\x6e\x6f\x77\x20\x28\x43\x74\x72\x6c\x2d\x58"
"\x20\x74\x6f\x20\x61\x62\x6f\x72\x74\x29\x3a\x0d\x0a\x01\x6e" // 283 StartXferNow
......
......@@ -740,6 +740,11 @@ static BOOL winsock_startup(void)
#endif
static char* server_host_name(void)
{
return startup->host_name[0] ? startup->host_name : scfg.sys_inetaddr;
}
static void status(char* str)
{
if(startup!=NULL && startup->status!=NULL)
......@@ -2797,7 +2802,7 @@ static BOOL parse_headers(http_session_t * session)
}
if(content_len)
session->req.post_len = content_len;
add_env(session,"SERVER_NAME",session->req.host[0] ? session->req.host : startup->host_name );
add_env(session,"SERVER_NAME",session->req.host[0] ? session->req.host : server_host_name() );
return TRUE;
}
......@@ -3125,12 +3130,12 @@ static BOOL get_request_headers(http_session_t * session)
}
if(!(session->req.vhost[0])) {
SAFECOPY(session->req.vhost, startup->host_name);
SAFECOPY(session->req.vhost, server_host_name());
/* Lower-case for normalization */
strlwr(session->req.vhost);
}
if(!(session->req.host[0])) {
SAFECOPY(session->req.host, startup->host_name);
SAFECOPY(session->req.host, server_host_name());
/* Lower-case for normalization */
strlwr(session->req.host);
}
......@@ -5764,7 +5769,7 @@ js_initcx(http_session_t *session)
if(!js_CreateCommonObjects(js_cx, &scfg, NULL
,NULL /* global */
,uptime /* system */
,startup->host_name /* system */
,server_host_name() /* system */
,SOCKLIB_DESC /* system */
,&session->js_callback /* js */
,&startup->js /* js */
......@@ -7067,9 +7072,6 @@ void DLLCALL web_server(void* arg)
iniCloseFile(fp);
}
if(startup->host_name[0]==0)
SAFECOPY(startup->host_name,scfg.sys_inetaddr);
if(uptime==0)
uptime=time(NULL); /* this must be done *after* setting the timezone */
......
......@@ -1378,7 +1378,7 @@ void sbbs_t::forwardmail(smbmsg_t *msg, int usernumber)
/* Security logging */
msg_client_hfields(msg,&client);
smb_hfield_str(msg,SENDERSERVER,startup->host_name);
smb_hfield_str(msg,SENDERSERVER, server_host_name());
username(&cfg,usernumber,touser);
smb_hfield_str(msg,RECIPIENT,touser);
......
Name: Domain Poker
Desc: Real-time 5 card draw poker
By: King Drafus (Allen Christiansen), Domain Entertainment
Cats: Games
Subs: Casino, Cards, Multiplayer, Native
Inst: $Id: install-xtrn.ini,v 1.1 2020/04/17 08:41:51 rswindell Exp $
[prog:DPOKER]
cmd = dpoker%. /l
clean_cmd = dpoker%. /clean
settings = XTRN_MULTIUSER|XTRN_NATIVE|XTRN_MODUSERDAT
type = XTRN_SBBS
required = true
Name: Synchronet Blackjack
Desc: Multiplayer 21, the first game written for Synchronet
By: Digital Man (Rob Swindell)
Cats: Games
Subs: Casino, Cards, Multiplayer, Chat, Native
Inst: $Id: install-xtrn.ini,v 1.1 2020/04/17 08:41:51 rswindell Exp $
[prog:SBJ]
cmd = sbj%.
clean_cmd = sbjclean%.
settings = XTRN_MULTIUSER|XTRN_NATIVE|XTRN_MODUSERDAT
type = XTRN_SBBS
required = true