Synchronet now requires the libarchive development package (e.g. libarchive-dev on Debian-based Linux distros, libarchive.org for more info) to build successfully.

Commit c0bf60f6 authored by rswindell's avatar rswindell

Added support for storing SexPOTS-provided caller-ID information into the

appropriate sbbs_t member variables (cid and client_name), which get logged,
displayed, and stored in the user record accordingly.
parent ea4fa23c
......@@ -349,9 +349,19 @@ bool sbbs_t::answer()
if(!online)
return(false);
if(stricmp(terminal,"sexpots")==0) { /* dial-up connection */
if(stricmp(terminal,"sexpots")==0) { /* dial-up connection (via SexPOTS) */
node_connection = (ushort)cur_rate;
SAFEPRINTF(connection,"%lu",cur_rate);
if(telnet_location[0]) { /* Caller-ID info provided */
SAFECOPY(cid,telnet_location);
truncstr(cid," "); /* Only include phone number in CID */
char* p=telnet_location;
FIND_WHITESPACE(p);
SKIP_WHITESPACE(p);
if(*p) {
SAFECOPY(client_name,p); /* CID name, if provided (maybe 'P' or 'O' if private or out-of-area) */
}
}
}
useron.misc&=~(ANSI|COLOR|RIP|WIP);
......
......@@ -1082,13 +1082,13 @@ static BYTE* telnet_interpret(sbbs_t* sbbs, BYTE* inbuf, int inlen,
sbbs->cur_cps=sbbs->cur_rate/10;
} else if(option==TELNET_SEND_LOCATION) {
char location[128];
sprintf(location,"%.*s",(int)sbbs->telnet_cmdlen-5,sbbs->telnet_cmd+3);
safe_snprintf(sbbs->telnet_location
,sizeof(sbbs->telnet_location)
,"%.*s",(int)sbbs->telnet_cmdlen-5,sbbs->telnet_cmd+3);
lprintf(LOG_DEBUG,"Node %d %s telnet location: %s"
,sbbs->cfg.node_num
,sbbs->telnet_mode&TELNET_MODE_GATE ? "passed-through" : "received"
,location);
/* ToDo: store and log the location */
,sbbs->telnet_location);
} else if(option==TELNET_NEGOTIATE_WINDOW_SIZE) {
long cols = (sbbs->telnet_cmd[3]<<8) | sbbs->telnet_cmd[4];
......@@ -2571,7 +2571,7 @@ sbbs_t::sbbs_t(ushort node_num, DWORD addr, char* name, SOCKET sd,
if(node_num)
SAFEPRINTF(nodestr,"Node %d",node_num);
else
strcpy(nodestr,name);
SAFECOPY(nodestr,name);
lprintf(LOG_DEBUG,"%s constructor using socket %d (settings=%lx)"
,nodestr, sd, global_cfg->node_misc);
......@@ -2618,6 +2618,7 @@ sbbs_t::sbbs_t(ushort node_num, DWORD addr, char* name, SOCKET sd,
client_socket_dup=INVALID_SOCKET;
client_ident[0]=0;
telnet_location[0]=0;
terminal[0]=0;
rlogin_name[0]=0;
rlogin_pass[0]=0;
......
......@@ -214,6 +214,7 @@ public:
uint telnet_cmdlen;
ulong telnet_mode;
uchar telnet_last_rxch;
char telnet_location[128];
char terminal[TELNET_TERM_MAXLEN+1];
time_t event_time; // Time of next exclusive event
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment