summaryrefslogtreecommitdiff
path: root/src/modules
diff options
context:
space:
mode:
authordanieldg <danieldg@e03df62e-2008-0410-955e-edbf42e46eb7>2009-10-09 22:07:46 +0000
committerdanieldg <danieldg@e03df62e-2008-0410-955e-edbf42e46eb7>2009-10-09 22:07:46 +0000
commit5815ca219e35cf840043e36db960ee7b7058e0c6 (patch)
tree4b6bd66418b4bacff22b56ec8e0494bec497770d /src/modules
parent611eda94127cfca78591915155eff491337db446 (diff)
Fix hook finding code and error reporting
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@11813 e03df62e-2008-0410-955e-edbf42e46eb7
Diffstat (limited to 'src/modules')
-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);