summaryrefslogtreecommitdiff
path: root/src/xline.cpp
diff options
context:
space:
mode:
authorGravatar brain2007-11-02 14:01:55 +0000
committerGravatar brain2007-11-02 14:01:55 +0000
commit17a80c5a8ef43675bf0d6937f35c950d7348f9ee (patch)
tree0bf58bddba4d476814e03ceed924434eca78515d /src/xline.cpp
parentMove lookup_lines to private, theres no need for it to be public any more (diff)
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
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>("*","*");