]> git.netwichtig.de Git - user/henk/code/inspircd.git/commitdiff
Fix hook finding code and error reporting
authordanieldg <danieldg@e03df62e-2008-0410-955e-edbf42e46eb7>
Fri, 9 Oct 2009 22:07:46 +0000 (22:07 +0000)
committerdanieldg <danieldg@e03df62e-2008-0410-955e-edbf42e46eb7>
Fri, 9 Oct 2009 22:07:46 +0000 (22:07 +0000)
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@11813 e03df62e-2008-0410-955e-edbf42e46eb7

src/modules/m_spanningtree/resolvers.cpp
src/modules/m_spanningtree/treesocket1.cpp

index 0133b332a47ca21f1b71fa439a4fa973b84354a1..822fcc6f5d4825885cb3f524f9040fc236dead3d 100644 (file)
@@ -53,9 +53,8 @@ void ServernameResolver::OnLookupComplete(const std::string &result, unsigned in
                else
                {
                        /* Something barfed, show the opers */
-                       ServerInstance->SNO->WriteToSnoMask('l', "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(), newsocket->error.c_str());
                        ServerInstance->GlobalCulls.AddItem(newsocket);
-                       Utils->Creator->ConnectServer(myautoconnect, false);
                }
        }
 }
index 7e62d6a2c69988ae4789ce32e2865794e114874c..d99d8d6c9d55021faae8bd54e112623a63194a50 100644 (file)
@@ -48,7 +48,7 @@ TreeSocket::TreeSocket(SpanningTreeUtilities* Util, const std::string& shost, in
                                std::string name = (**i).ModuleSourceFile;
                                int a = name.rfind('_');
                                int b = name.rfind('.');
-                               name = name.substr(a, b-a-1);
+                               name = name.substr(a+1, b-a-1);
                                if (name == hook)
                                {
                                        AddIOHook(*i);