aboutsummaryrefslogtreecommitdiffstats
path: root/src/modules/m_spanningtree.cpp
diff options
context:
space:
mode:
authorGravatar brain2006-06-28 10:59:47 +0000
committerGravatar brain2006-06-28 10:59:47 +0000
commitb254d3d034d5e16326404d253c8574bea9b711d4 (patch)
tree40932c313124e89d95b53775db77bde4c79e07f2 /src/modules/m_spanningtree.cpp
parentAllow binding to hosts again in <bind> and <link> (diff)
downloadinspircd++-b254d3d034d5e16326404d253c8574bea9b711d4.tar.gz
inspircd++-b254d3d034d5e16326404d253c8574bea9b711d4.tar.bz2
inspircd++-b254d3d034d5e16326404d253c8574bea9b711d4.zip
More stuff for allowing hostnames in <bind> and <link> again - note there is a FIXME here.
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@4076 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 e15ac11b7..44786923c 100644
--- a/src/modules/m_spanningtree.cpp
+++ b/src/modules/m_spanningtree.cpp
@@ -2705,6 +2705,7 @@ class TreeSocket : public InspSocket
* IPs for which we don't have a link block.
*/
bool found = false;
+ char resolved_host[MAXBUF];
vector<Link>::iterator i;
for (i = LinkBlocks.begin(); i != LinkBlocks.end(); i++)
{
@@ -2713,6 +2714,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)
{