summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/modules/m_spanningtree/resolvers.cpp3
-rw-r--r--src/modules/m_spanningtree/treesocket1.cpp2
2 files changed, 2 insertions, 3 deletions
diff --git a/src/modules/m_spanningtree/resolvers.cpp b/src/modules/m_spanningtree/resolvers.cpp
index 0133b332a..822fcc6f5 100644
--- a/src/modules/m_spanningtree/resolvers.cpp
+++ b/src/modules/m_spanningtree/resolvers.cpp
@@ -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);
}
}
}
diff --git a/src/modules/m_spanningtree/treesocket1.cpp b/src/modules/m_spanningtree/treesocket1.cpp
index 7e62d6a2c..d99d8d6c9 100644
--- a/src/modules/m_spanningtree/treesocket1.cpp
+++ b/src/modules/m_spanningtree/treesocket1.cpp
@@ -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);