summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorbrain <brain@e03df62e-2008-0410-955e-edbf42e46eb7>2004-04-14 17:36:59 +0000
committerbrain <brain@e03df62e-2008-0410-955e-edbf42e46eb7>2004-04-14 17:36:59 +0000
commit296df45059c076a982399dde899530f967de27fd (patch)
treefdb5a7a9db9326587c87dc2394609cdf5361fea5 /src
parente5af9e08dc6ae2fc3527514ab98f584ade786555 (diff)
Fixes
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@573 e03df62e-2008-0410-955e-edbf42e46eb7
Diffstat (limited to 'src')
-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);