diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/inspircd.cpp | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/src/inspircd.cpp b/src/inspircd.cpp index 00e831b66..dc57048b1 100644 --- a/src/inspircd.cpp +++ b/src/inspircd.cpp @@ -6993,9 +6993,20 @@ void handle_link_packet(char* udp_msg, char* udp_host, serverrec *serv) char* servername = strtok(params," "); char* password = strtok(NULL," "); char* myport = strtok(NULL," "); + char* revision = strtok(NULL," "); char* serverdesc = finalparam+2; + WriteOpers("CONNECT from %s (%s) (their port: %d)",servername,udp_host,atoi(myport)); + if (atoi(revision) != GetRevision()) + { + WriteOpers("Could not link to %s, is an incompatible version %s, our version is %d",servername,revision,GetRevision()); + char buffer[MAXBUF]; + sprintf(buffer,"E :Version number mismatch"); + serv->SendPacket(buffer,udp_host); + return; + } + for (int j = 0; j < serv->connectors.size(); j++) { if (!strcasecmp(serv->connectors[j].GetServerName().c_str(),udp_host)) |