strncpy(clientlist[nick]->host, host,160);
strncpy(clientlist[nick]->dhost, dhost,160);
strncpy(clientlist[nick]->server, server,256);
- strncpy(clientlist[nick]->ident, ident,10); // +1 char to compensate for '~'
+ strncpy(clientlist[nick]->ident, ident,10); // +1 char to compensate for tilde
strncpy(clientlist[nick]->fullname, gecos,128);
clientlist[nick]->signon = TS;
clientlist[nick]->nping = 0; // this is ignored for a remote user anyway.
char* ipaddr = strtok(NULL," ");
char* ipport = strtok(NULL," ");
char* cookie = strtok(NULL," ");
+ log(DEBUG," ");
+ log(DEBUG," ");
+ log(DEBUG,"*** Connecting back to %s:%d",ipaddr,ipport);
me[defaultRoute]->MeshCookie(ipaddr,atoi(ipport),atoi(cookie),servername);
+ log(DEBUG," ");
}
if (auth_cookies[u] == atoi(cookie))
{
WriteOpers("Allowed cookie from %s, is now part of the mesh",servername);
+
+
+ for (int j = 0; j < 32; j++)
+ {
+ if (me[j] != NULL)
+ {
+ for (int k = 0; k < me[j]->connectors.size(); k++)
+ {
+ if (!strcasecmp(me[j]->connectors[k].GetServerName().c_str(),udp_host))
+ {
+ me[j]->connectors[k].SetServerName(servername);
+ return;
+ }
+ }
+ }
+ WriteOpers("\2WARNING!\2 %s sent us an authentication packet but we are not authenticating with this server right now! Possible intrusion attempt!",udp_host);
+ return;
+ }
+
+
return;
}
}