summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/connection.cpp1
-rw-r--r--src/inspircd.cpp33
2 files changed, 8 insertions, 26 deletions
diff --git a/src/connection.cpp b/src/connection.cpp
index e2be63c33..513ac69db 100644
--- a/src/connection.cpp
+++ b/src/connection.cpp
@@ -269,6 +269,7 @@ bool connection::RecvPacket(char *message, char* host)
// something new on this socket, fill the return values and bail
strncpy(host,this->connectors[i].GetServerName().c_str(),160);
message[rcvsize-1] = 0;
+ log(DEBUG,"main: Connection::RecvPacket() got '%s' from %s",message,host);
return true;
}
}
diff --git a/src/inspircd.cpp b/src/inspircd.cpp
index 8a30a21c3..5b37cccc4 100644
--- a/src/inspircd.cpp
+++ b/src/inspircd.cpp
@@ -6732,32 +6732,13 @@ void handle_link_packet(char* udp_msg, char* udp_host, serverrec *serv)
log(DEBUG,"(%d) Comparing against name='%s', ipaddr='%s', port='%s', recvpass='%s'",i,Link_ServerName,Link_IPAddr,Link_Port,Link_Pass);
LinkPort = atoi(Link_Port);
if (!strcasecmp(Link_ServerName,servername))
- {
- if (!strcasecmp(Link_IPAddr,udp_host))
- {
- // we have a matching link line -
- // send a 'diminutive' server message back...
- snprintf(response,10240,"s %s %s :%s",ServerName,Link_SendPass,ServerDesc);
- serv->SendPacket(response,udp_host);
- WriteOpers("CONNECT from %s accepted, authenticating",servername);
- for (int j = 0; j < 255; j++)
- {
- if (servers[j] == NULL)
- {
- servers[j] = new serverrec;
- strcpy(servers[j]->internal_addr,udp_host);
- strcpy(servers[j]->name,servername);
- strcpy(servers[j]->description,serverdesc);
- // create a server record for this server
- WriteOpers("Server %s authenticated, exchanging server keys...",servername);
- snprintf(response,10240,"O %d",MyKey);
- serv->SendPacket(response,udp_host);
- return;
- }
- }
- WriteOpers("Internal error connecting to %s, failed to create server record!",servername);
- return;
- }
+ {
+ // we have a matching link line -
+ // send a 'diminutive' server message back...
+ snprintf(response,10240,"s %s %s :%s",ServerName,Link_SendPass,ServerDesc);
+ serv->SendPacket(response,udp_host);
+ WriteOpers("Internal error connecting to %s, failed to create server record!",servername);
+ return;
}
else {
log(DEBUG,"Server names '%s' and '%s' don't match",Link_ServerName,servername);