+ /* First check for instances of the server that are waiting between the inbound and outbound SERVER command */
+ TreeSocket* CheckDupeSocket = Utils->FindBurstingServer(sname);
+ if (CheckDupeSocket)
+ {
+ /* If we find one, we abort the link to prevent a race condition */
+ this->SendError("Negotiation collision");
+ this->Instance->SNO->WriteToSnoMask('l',"Server connection from \2"+sname+"\2 denied, already exists in a negotiating state.");
+ CheckDupeSocket->SendError("Negotiation collision");
+ Instance->SE->DelFd(CheckDupeSocket);
+ CheckDupeSocket->Close();
+ return false;
+ }
+ /* Check for fully initialized instances of the server by id */
+ Instance->Log(DEBUG,"Looking for dupe SID %s", sid.c_str());
+ TreeServer* CheckDupeSID = Utils->FindServerID(sid);
+ if (CheckDupeSID)
+ {
+ this->SendError("Server ID "+CheckDupeSID->GetID()+" already exists on server "+CheckDupeSID->GetName()+"!");
+ this->Instance->SNO->WriteToSnoMask('l',"Server connection from \2"+sname+"\2 denied, server ID '"+CheckDupeSID->GetID()+
+ "' already exists on server "+CheckDupeSID->GetName());
+ return false;
+ }
+ /* Now check for fully initialized instances of the server by name */