From 17a80c5a8ef43675bf0d6937f35c950d7348f9ee Mon Sep 17 00:00:00 2001 From: brain Date: Fri, 2 Nov 2007 14:01:55 +0000 Subject: Hopefully fix the bursting of xlines to work again (even with unknown types) and also add facility to enumerate them git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@8461 e03df62e-2008-0410-955e-edbf42e46eb7 --- src/xline.cpp | 22 ++++++++++++++++++++-- 1 file changed, 20 insertions(+), 2 deletions(-) (limited to 'src/xline.cpp') 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 XLineManager::GetAllTypes() +{ + std::vector 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("*","*"); -- cgit v1.3.1-10-gc9f91