summaryrefslogtreecommitdiff
path: root/src/xline.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/xline.cpp')
-rw-r--r--src/xline.cpp22
1 files changed, 20 insertions, 2 deletions
diff --git a/src/xline.cpp b/src/xline.cpp
index b11f9f27c..028067794 100644
--- a/src/xline.cpp
+++ b/src/xline.cpp
@@ -59,9 +59,9 @@ bool XLine::Matches(User *u)
*/
void XLineManager::CheckELines()
{
- ContainerIter n = ServerInstance->XLines->lookup_lines.find("E");
+ ContainerIter n = lookup_lines.find("E");
- if (n == ServerInstance->XLines->lookup_lines.end())
+ if (n == lookup_lines.end())
return;
XLineLookup& ELines = n->second;
@@ -82,6 +82,24 @@ void XLineManager::CheckELines()
}
+XLineLookup* XLineManager::GetAll(const std::string &type)
+{
+ ContainerIter n = lookup_lines.find(type);
+
+ if (n == lookup_lines.end())
+ return NULL;
+
+ return &(n->second);
+}
+
+std::vector<std::string> XLineManager::GetAllTypes()
+{
+ std::vector<std::string> items;
+ for (ContainerIter x = lookup_lines.begin(); x != lookup_lines.end(); ++x)
+ items.push_back(x->first);
+ return items;
+}
+
IdentHostPair XLineManager::IdentSplit(const std::string &ident_and_host)
{
IdentHostPair n = std::make_pair<std::string,std::string>("*","*");