+ /** Create an XLine factory
+ * @param t Type of XLine this factory generates
+ */
+ XLineFactory(const std::string &t) : type(t) { }
+
+ /** Return the type of XLine this factory generates
+ * @return The type of XLine this factory generates
+ */
+ virtual const std::string& GetType() { return type; }
+
+ /** Generate a specialized XLine*.
+ * @param set_time Time this line was created
+ * @param duration Duration of the line
+ * @param source The sender of the line, nickname or server
+ * @param reason The reason for the line
+ * @param xline_specific_mask The mask string for the line, specific to the XLine type being created.
+ * @return A specialized XLine class of the given type for this factory.
+ */
+ virtual XLine* Generate(time_t set_time, long duration, std::string source, std::string reason, std::string xline_specific_mask) = 0;
+
+ virtual bool AutoApplyToUserList(XLine* x) { return true; }
+
+ /** Destructor
+ */
+ virtual ~XLineFactory() { }
+};
+
+/** XLineManager is a class used to manage glines, klines, elines, zlines and qlines,
+ * or any other line created by a module. It also manages XLineFactory classes which
+ * can generate a specialized XLine for use by another module.