]> git.netwichtig.de Git - user/henk/code/inspircd.git/blobdiff - src/modules/m_spanningtree/resolvers.cpp
Create StreamSocket for IO hooking implementation
[user/henk/code/inspircd.git] / src / modules / m_spanningtree / resolvers.cpp
index 73e67c4f7e40da4326f23673b10a42e1e56c69d8..c7c49b348872879f673879508d583346f4d9ec0d 100644 (file)
@@ -49,7 +49,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,MyLink.Timeout ? MyLink.Timeout : 10,MyLink.Name.c_str(),
+               TreeSocket* newsocket = new TreeSocket(this->Utils, result,MyLink.Port,MyLink.Timeout ? MyLink.Timeout : 10,MyLink.Name.c_str(),
                                                        MyLink.Bind, myautoconnect, MyLink.Hook.empty() ? NULL : Utils->hooks[MyLink.Hook.c_str()]);
                if (newsocket->GetFd() > -1)
                {
@@ -59,8 +59,7 @@ void ServernameResolver::OnLookupComplete(const std::string &result, unsigned in
                {
                        /* Something barfed, show the opers */
                        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;
+                       ServerInstance->GlobalCulls.AddItem(newsocket);
                        Utils->DoFailOver(myautoconnect);
                }
        }