Fix hook finding code and error reporting

git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@11813 e03df62e-2008-0410-955e-edbf42e46eb7
This commit is contained in:
danieldg 2009-10-09 22:07:46 +00:00
parent 611eda9412
commit 5815ca219e
2 changed files with 2 additions and 3 deletions

View 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);
}
}
}

View 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);