summaryrefslogtreecommitdiff
path: root/src/modules/m_spanningtree/utils.cpp
diff options
context:
space:
mode:
authorbrain <brain@e03df62e-2008-0410-955e-edbf42e46eb7>2007-08-27 21:09:46 +0000
committerbrain <brain@e03df62e-2008-0410-955e-edbf42e46eb7>2007-08-27 21:09:46 +0000
commit07c58b6fb8da655a45d4d4d17dd6d518f60b00dd (patch)
treeccc25c7c98d79f527d090ef6c9d7d60e9bf9f981 /src/modules/m_spanningtree/utils.cpp
parent66d187fa55b4fdcb38ec987c269c4c1573a441b5 (diff)
This may need tidying up to make SetID internal and do this in the constructor, but for now it works.
AWOOGA AWOOGA WARNING: SetID can throw a CoreException if the id already exists! git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@7919 e03df62e-2008-0410-955e-edbf42e46eb7
Diffstat (limited to 'src/modules/m_spanningtree/utils.cpp')
-rw-r--r--src/modules/m_spanningtree/utils.cpp9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/modules/m_spanningtree/utils.cpp b/src/modules/m_spanningtree/utils.cpp
index b8a634797..3f5a910c9 100644
--- a/src/modules/m_spanningtree/utils.cpp
+++ b/src/modules/m_spanningtree/utils.cpp
@@ -149,6 +149,15 @@ TreeServer* SpanningTreeUtilities::FindServerMask(const std::string &ServerName)
return NULL;
}
+TreeServer* SpanningTreeUtilities::FindServerID(const std::string &id)
+{
+ server_hash::iterator iter = sidlist.find(id);
+ if (iter != sidlist.end())
+ return iter->second;
+ else
+ return NULL;
+}
+
/* A convenient wrapper that returns true if a server exists */
bool SpanningTreeUtilities::IsServer(const std::string &ServerName)
{