]> git.netwichtig.de Git - user/henk/code/inspircd.git/blobdiff - src/xline.cpp
Hooray
[user/henk/code/inspircd.git] / src / xline.cpp
index 5d5a95516b27ec8e3a998c3d9d6b3610163f437e..8843b99898908babdc5cecacfbc3fd025caf8315 100644 (file)
@@ -11,7 +11,7 @@
  * ---------------------------------------------------
  */
 
-/* $Core: libIRCDxline */
+/* $Core */
 
 #include "inspircd.h"
 #include "wildcard.h"
@@ -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;