]> git.netwichtig.de Git - user/henk/code/inspircd.git/blobdiff - src/modules/m_spanningtree/resolvers.cpp
We already have an error for not enough params to the SERVER command, but the error...
[user/henk/code/inspircd.git] / src / modules / m_spanningtree / resolvers.cpp
index b033b5265512792aab10b0599d2799285643f582..bbdfb7ce5fe303bb805e8389ff95d3a0106ae38a 100644 (file)
@@ -2,7 +2,7 @@
  *       | Inspire Internet Relay Chat Daemon |
  *       +------------------------------------+
  *
- *  InspIRCd: (C) 2002-2007 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
@@ -15,7 +15,6 @@
 #include "commands/cmd_whois.h"
 #include "commands/cmd_stats.h"
 #include "socket.h"
-#include "wildcard.h"
 #include "xline.h"
 #include "transport.h"
 
@@ -26,7 +25,7 @@
 #include "m_spanningtree/link.h"
 #include "m_spanningtree/treesocket.h"
 
-/* $ModDep: m_spanningtree/timesynctimer.h m_spanningtree/resolvers.h m_spanningtree/main.h m_spanningtree/utils.h m_spanningtree/treeserver.h m_spanningtree/link.h m_spanningtree/treesocket.h */
+/* $ModDep: m_spanningtree/resolvers.h m_spanningtree/main.h m_spanningtree/utils.h m_spanningtree/treeserver.h m_spanningtree/link.h m_spanningtree/treesocket.h */
 
 /** This class is used to resolve server hostnames during /connect and autoconnect.
  * As of 1.1, the resolver system is seperated out from BufferedSocket, so we must do this
@@ -55,7 +54,7 @@ void ServernameResolver::OnLookupComplete(const std::string &result, unsigned in
                if ((!MyLink.Hook.empty()) && (Utils->hooks.find(MyLink.Hook.c_str()) ==  Utils->hooks.end()))
                        return;
 
-               TreeSocket* newsocket = new TreeSocket(this->Utils, ServerInstance, result,MyLink.Port,false,MyLink.Timeout ? MyLink.Timeout : 10,MyLink.Name.c_str(),
+               TreeSocket* newsocket = new TreeSocket(this->Utils, ServerInstance, result,MyLink.Port,MyLink.Timeout ? MyLink.Timeout : 10,MyLink.Name.c_str(),
                                                        MyLink.Bind, MyLink.Hook.empty() ? NULL : Utils->hooks[MyLink.Hook.c_str()]);
                if (newsocket->GetFd() > -1)
                {
@@ -64,7 +63,7 @@ void ServernameResolver::OnLookupComplete(const std::string &result, unsigned in
                else
                {
                        /* Something barfed, show the opers */
-                       Utils->Creator->RemoteMessage(NULL, "CONNECT: Error connecting \002%s\002: %s.",MyLink.Name.c_str(),strerror(errno));
+                       ServerInstance->SNO->WriteToSnoMask('l', "CONNECT: Error connecting \002%s\002: %s.",MyLink.Name.c_str(),strerror(errno));
                        if (ServerInstance->SocketCull.find(newsocket) == ServerInstance->SocketCull.end())
                                ServerInstance->SocketCull[newsocket] = newsocket;
                        Utils->DoFailOver(&MyLink);
@@ -82,7 +81,7 @@ void ServernameResolver::OnError(ResolverError e, const std::string &errormessag
                ServerInstance->AddResolver(snr, cached);
                return;
        }
-       Utils->Creator->RemoteMessage(NULL, "CONNECT: Error connecting \002%s\002: Unable to resolve hostname - %s", MyLink.Name.c_str(), errormessage.c_str() );
+       ServerInstance->SNO->WriteToSnoMask('l', "CONNECT: Error connecting \002%s\002: Unable to resolve hostname - %s", MyLink.Name.c_str(), errormessage.c_str() );
        Utils->DoFailOver(&MyLink);
 }