git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@9975
e03df62e-2008-0410-955e-
edbf42e46eb7
*/
XLineLookup* GetAll(const std::string &type);
+ /** Remove all lines of a certain type.
+ */
+ void DelAll(const std::string &type);
+
/** Return all known types of line currently stored by the XLineManager.
* @return A vector containing all known line types currently stored in the main list.
*/
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;