]> git.netwichtig.de Git - user/henk/code/inspircd.git/blobdiff - src/modules/m_spanningtree/server.cpp
Change /CHECK <#channel> to correctly report timestamp since it might have been TS...
[user/henk/code/inspircd.git] / src / modules / m_spanningtree / server.cpp
index 1254d14d416dba6407254cd18d58f95d67045bb3..5f2e38aa0920ed3d18d4e79c8c5146db52c034bb 100644 (file)
@@ -2,7 +2,7 @@
  *       | Inspire Internet Relay Chat Daemon |
  *       +------------------------------------+
  *
- *  InspIRCd: (C) 2002-2008 InspIRCd Development Team
+ *  InspIRCd: (C) 2002-2009 InspIRCd Development Team
  * See: http://www.inspircd.org/wiki/index.php/Credits
  *
  * This program is free but copyrighted software; see
@@ -60,7 +60,7 @@ bool TreeSocket::RemoteServer(const std::string &prefix, std::deque<std::string>
        if (CheckDupe)
        {
                this->SendError("Server "+CheckDupe->GetName()+" already exists!");
-               this->ServerInstance->SNO->WriteToSnoMask('l',"Server \2"+CheckDupe->GetName()+"\2 being introduced from \2" + ParentOfThis->GetName() + "\2 denied, already exists. Closing link with " + ParentOfThis->GetName());
+               this->ServerInstance->SNO->WriteToSnoMask('L', "Server \2"+CheckDupe->GetName()+"\2 being introduced from \2" + ParentOfThis->GetName() + "\2 denied, already exists. Closing link with " + ParentOfThis->GetName());
                return false;
        }
 
@@ -70,15 +70,15 @@ bool TreeSocket::RemoteServer(const std::string &prefix, std::deque<std::string>
 
        if (Node->DuplicateID())
        {
-               this->SendError("Server ID "+servername+" already exists on the network!");
-               this->ServerInstance->SNO->WriteToSnoMask('l',"Server \2"+servername+"\2 being introduced from \2" + ParentOfThis->GetName() + "\2 denied, server ID already exists on the network. Closing link with " + ParentOfThis->GetName());
+               this->SendError("Server ID "+servername+" already exists on the network! You may want to specify the server ID for the server manually with <server:id> so they do not conflict.");
+               this->ServerInstance->SNO->WriteToSnoMask('L', "Server \2"+servername+"\2 being introduced from \2" + ParentOfThis->GetName() + "\2 denied, server ID already exists on the network. Closing link with " + ParentOfThis->GetName());
                return false;
        }
 
        ParentOfThis->AddChild(Node);
        params[4] = ":" + params[4];
        Utils->DoOneToAllButSender(prefix,"SERVER",params,prefix);
-       this->ServerInstance->SNO->WriteToSnoMask('l',"Server \002"+ParentOfThis->GetName()+"\002 introduced server \002"+servername+"\002 ("+description+")");
+       this->ServerInstance->SNO->WriteToSnoMask('L', "Server \002"+ParentOfThis->GetName()+"\002 introduced server \002"+servername+"\002 ("+description+")");
        return true;
 }
 
@@ -152,11 +152,13 @@ bool TreeSocket::Outbound_Reply_Server(std::deque<std::string> &params)
                 */
                this->LinkState = CONNECTED;
 
+               Utils->timeoutlist.erase(this);
+
                TreeServer *Node = new TreeServer(this->Utils, this->ServerInstance, sname, description, sid, Utils->TreeRoot, this, x->Hidden);
 
                if (Node->DuplicateID())
                {
-                       this->SendError("Server ID "+sid+" already exists on the network!");
+                       this->SendError("Server ID "+sid+" already exists on the network! You may want to specify the server ID for the server manually with <server:id> so they do not conflict.");
                        this->ServerInstance->SNO->WriteToSnoMask('l',"Server \2"+assign(servername)+"\2 being introduced denied, server ID already exists on the network. Closing link.");
                        return false;
                }
@@ -236,7 +238,7 @@ bool TreeSocket::Inbound_Server(std::deque<std::string> &params)
 
                if (CheckDupeSID)
                {
-                       this->SendError("Server ID "+CheckDupeSID->GetID()+" already exists on server "+CheckDupeSID->GetName()+"!");
+                       this->SendError("Server ID "+CheckDupeSID->GetID()+" already exists on server "+CheckDupeSID->GetName()+"! You may want to specify the server ID for the server manually with <server:id> so they do not conflict.");
                        this->ServerInstance->SNO->WriteToSnoMask('l',"Server connection from \2"+sname+"\2 denied, server ID '"+CheckDupeSID->GetID()+
                                        "' already exists on server "+CheckDupeSID->GetName());
                        return false;