summaryrefslogtreecommitdiff
path: root/src/xline.cpp
diff options
context:
space:
mode:
authorw00t <w00t@e03df62e-2008-0410-955e-edbf42e46eb7>2008-07-12 10:53:31 +0000
committerw00t <w00t@e03df62e-2008-0410-955e-edbf42e46eb7>2008-07-12 10:53:31 +0000
commit8f0b1082d8eb9927ab2fdb8e00328df69d198c9a (patch)
tree9b95e8e4006ae5de86530689eae2be6f376815d3 /src/xline.cpp
parent3798e67d95a44e50ce55b0bd25dc693aca56f318 (diff)
Add XLineManager::DelAll to delete all lines of a given type.
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@9975 e03df62e-2008-0410-955e-edbf42e46eb7
Diffstat (limited to 'src/xline.cpp')
-rw-r--r--src/xline.cpp16
1 files changed, 16 insertions, 0 deletions
diff --git a/src/xline.cpp b/src/xline.cpp
index 5d5a95516..0878ec286 100644
--- a/src/xline.cpp
+++ b/src/xline.cpp
@@ -116,6 +116,22 @@ XLineLookup* XLineManager::GetAll(const std::string &type)
return &(n->second);
}
+void XLineManager::DelAll(const std::string &type)
+{
+ ContainerIter n = lookup_lines.find(type);
+
+ if (n == lookup_lines.end())
+ return;
+
+ LookupIter x;
+
+ /* Delete all of a given type (this should probably use DelLine, but oh well) */
+ while ((x = n->second.begin()) != n->second.end())
+ {
+ ExpireLine(n, x);
+ }
+}
+
std::vector<std::string> XLineManager::GetAllTypes()
{
std::vector<std::string> items;