]> git.netwichtig.de Git - user/henk/code/inspircd.git/blobdiff - include/xline.h
Working privs implementation, and example usage in NOTICE for mass messaging.
[user/henk/code/inspircd.git] / include / xline.h
index 6d11256f21a170d36a773764e2bd086fbadd44d3..886034bbafd81df76658a621dc28bf3b9ea0ef8e 100644 (file)
@@ -385,7 +385,7 @@ typedef std::pair<std::string, std::string> IdentHostPair;
  * does not have to know the specifics of the internals of an XLine class
  * and/or how to call its constructor.
  */
-class CoreExport XLineFactory
+class CoreExport XLineFactory : public classbase
 {
  protected:
 
@@ -415,6 +415,8 @@ class CoreExport XLineFactory
         */
        virtual XLine* Generate(time_t set_time, long duration, const char* source, const char* reason, const char* xline_specific_mask) = 0;
 
+       virtual bool AutoApplyToUserList(XLine* x) { return true; }
+
        /** Destructor
         */
        virtual ~XLineFactory() { }
@@ -437,7 +439,7 @@ typedef std::map<std::string, XLineFactory*> XLineFactMap;
 
 /** A map of XLines indexed by string
  */
-typedef std::map<std::string, XLine *> XLineLookup;
+typedef std::map<irc::string, XLine *> XLineLookup;
 
 /** A map of XLineLookup maps indexed by string
  */
@@ -455,7 +457,7 @@ typedef XLineLookup::iterator LookupIter;
  * or any other line created by a module. It also manages XLineFactory classes which
  * can generate a specialized XLine for use by another module.
  */
-class CoreExport XLineManager
+class CoreExport XLineManager : public classbase
 {
  protected:
        /** The owner/creator of this class
@@ -515,6 +517,10 @@ class CoreExport XLineManager
         */
        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.
         */