Changed server broadcasts
This commit is contained in:
parent
2aa3d8d002
commit
0acd645b68
@ -512,7 +512,7 @@ void command_pass(char *hostname, char *parameters)
|
|||||||
void command_server(char *hostname, char *parameters)
|
void command_server(char *hostname, char *parameters)
|
||||||
{
|
{
|
||||||
ncs_list *tnsl;
|
ncs_list *tnsl;
|
||||||
char *name, *hops, *id, *prod, *vers, *fullname;
|
char temp[512], *name, *hops, *id, *prod, *vers, *fullname;
|
||||||
unsigned long token;
|
unsigned long token;
|
||||||
int ihops;
|
int ihops;
|
||||||
|
|
||||||
@ -532,7 +532,7 @@ void command_server(char *hostname, char *parameters)
|
|||||||
|
|
||||||
Syslog('r', "name \"%s\"", printable(name, 0));
|
Syslog('r', "name \"%s\"", printable(name, 0));
|
||||||
Syslog('r', "hops \"%s\"", printable(hops, 0));
|
Syslog('r', "hops \"%s\"", printable(hops, 0));
|
||||||
Syslog('r', "id \"%s\"", printable(id, 0));
|
Syslog('r', "id \"%s\"", printable(id, 0));
|
||||||
Syslog('r', "prod \"%s\"", printable(prod, 0));
|
Syslog('r', "prod \"%s\"", printable(prod, 0));
|
||||||
Syslog('r', "vers \"%s\"", printable(vers, 0));
|
Syslog('r', "vers \"%s\"", printable(vers, 0));
|
||||||
Syslog('r', "full \"%s\"", printable(fullname, 0));
|
Syslog('r', "full \"%s\"", printable(fullname, 0));
|
||||||
@ -544,6 +544,7 @@ void command_server(char *hostname, char *parameters)
|
|||||||
}
|
}
|
||||||
|
|
||||||
token = atoi(id);
|
token = atoi(id);
|
||||||
|
sprintf(temp, "SERVER %s %d %s %s %s %s", name, ihops, id, prod, vers, fullname);
|
||||||
|
|
||||||
if (tnsl->token) {
|
if (tnsl->token) {
|
||||||
/*
|
/*
|
||||||
@ -552,6 +553,7 @@ void command_server(char *hostname, char *parameters)
|
|||||||
* In that case, the session is authorized.
|
* In that case, the session is authorized.
|
||||||
*/
|
*/
|
||||||
if (tnsl->token == token) {
|
if (tnsl->token == token) {
|
||||||
|
broadcast(temp, tnsl->server);
|
||||||
tnsl->gotserver = TRUE;
|
tnsl->gotserver = TRUE;
|
||||||
changed = TRUE;
|
changed = TRUE;
|
||||||
tnsl->state = NCS_CONNECT;
|
tnsl->state = NCS_CONNECT;
|
||||||
@ -574,6 +576,7 @@ void command_server(char *hostname, char *parameters)
|
|||||||
send_msg(tnsl->socket, tnsl->servaddr_in, tnsl->server, csbuf);
|
send_msg(tnsl->socket, tnsl->servaddr_in, tnsl->server, csbuf);
|
||||||
sprintf(csbuf, "SERVER %s 0 %ld mbsebbs %s %s\r\n", tnsl->myname, token, VERSION, CFG.bbs_name);
|
sprintf(csbuf, "SERVER %s 0 %ld mbsebbs %s %s\r\n", tnsl->myname, token, VERSION, CFG.bbs_name);
|
||||||
send_msg(tnsl->socket, tnsl->servaddr_in, tnsl->server, csbuf);
|
send_msg(tnsl->socket, tnsl->servaddr_in, tnsl->server, csbuf);
|
||||||
|
broadcast(temp, tnsl->server);
|
||||||
tnsl->gotserver = TRUE;
|
tnsl->gotserver = TRUE;
|
||||||
tnsl->state = NCS_CONNECT;
|
tnsl->state = NCS_CONNECT;
|
||||||
tnsl->action = now + (time_t)10;
|
tnsl->action = now + (time_t)10;
|
||||||
|
Reference in New Issue
Block a user