From dcafa1a379bab45d623d365706491ccf59cd61e6 Mon Sep 17 00:00:00 2001 From: brain Date: Mon, 28 Mar 2005 13:35:16 +0000 Subject: Fixed to actually CHECK THE PASSWORD of linking servers! git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@929 e03df62e-2008-0410-955e-edbf42e46eb7 --- src/commands.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/commands.cpp b/src/commands.cpp index 9385ae3f3..7eed17478 100644 --- a/src/commands.cpp +++ b/src/commands.cpp @@ -2847,7 +2847,7 @@ void handle_link_packet(char* udp_msg, char* tcp_host, serverrec *serv) ConfValue("link","sendpass",i,Link_SendPass,&config_f); 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_ServerName,servername)) && (!strcmp(Link_Pass,password))) { // we have a matching link line - // send a 'diminutive' server message back... @@ -2971,7 +2971,7 @@ void handle_link_packet(char* udp_msg, char* tcp_host, serverrec *serv) ConfValue("link","sendpass",i,Link_SendPass,&config_f); 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_ServerName,servername)) && (!strcmp(Link_Pass,password))) { // matching link at this end too, we're all done! // at this point we must begin key exchange and insert this -- cgit v1.2.3