X-Git-Url: https://git.netwichtig.de/gitweb/?a=blobdiff_plain;f=src%2Fxline.cpp;h=8843b99898908babdc5cecacfbc3fd025caf8315;hb=9ebc0997ccd8c6eea8742d0f9c59b9e3f78c85fc;hp=5d5a95516b27ec8e3a998c3d9d6b3610163f437e;hpb=4b856bda135a08e800b96c970a10b0b6a34d433a;p=user%2Fhenk%2Fcode%2Finspircd.git diff --git a/src/xline.cpp b/src/xline.cpp index 5d5a95516..8843b9989 100644 --- a/src/xline.cpp +++ b/src/xline.cpp @@ -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 XLineManager::GetAllTypes() { std::vector items;