aboutsummaryrefslogtreecommitdiffstats
path: root/src/modules/m_spanningtree.cpp
diff options
context:
space:
mode:
authorGravatar brain2006-06-28 11:02:14 +0000
committerGravatar brain2006-06-28 11:02:14 +0000
commit53bd1da1187e40c3c3f55de70aa705651999efef (patch)
treef4336cc0243434ca5968ad50ea23794ef49460e9 /src/modules/m_spanningtree.cpp
parentAllow binding by hostname again in <link> and <bind> (diff)
Allow hosts in <bind> and <link> -- see FIXME for minor issue to be fixed in 1.1 (probably not major enough to fix in 1.0?)
git-svn-id: http://svn.inspircd.org/repository/branches/1_0_stable@4077 e03df62e-2008-0410-955e-edbf42e46eb7
Diffstat (limited to 'src/modules/m_spanningtree.cpp')
-rw-r--r--src/modules/m_spanningtree.cpp12
1 files changed, 12 insertions, 0 deletions
diff --git a/src/modules/m_spanningtree.cpp b/src/modules/m_spanningtree.cpp
index 7df31ba11..2a0865470 100644
--- a/src/modules/m_spanningtree.cpp
+++ b/src/modules/m_spanningtree.cpp
@@ -2692,6 +2692,7 @@ class TreeSocket : public InspSocket
* IPs for which we don't have a link block. -Special
*/
bool found = false;
+ char resolved_host[MAXBUF];
vector<Link>::iterator i;
for (i = LinkBlocks.begin(); i != LinkBlocks.end(); i++)
{
@@ -2700,6 +2701,17 @@ class TreeSocket : public InspSocket
found = true;
break;
}
+ /* XXX: Fixme: blocks for a very short amount of time,
+ * we should cache these on rehash/startup
+ */
+ if (CleanAndResolve(resolved_host,i->IPAddr.c_str(),true))
+ {
+ if (std::string(resolved_host) == ip)
+ {
+ found = true;
+ break;
+ }
+ }
}
if (!found)
{