+/** An XLineFactory specialized to generate GLine* pointers
+ */
+class GLineFactory : public XLineFactory
+{
+ public:
+ GLineFactory() : XLineFactory("G") { }
+
+ /** Generate a GLine
+ */
+ XLine* Generate(time_t set_time, long duration, std::string source, std::string reason, std::string xline_specific_mask)
+ {
+ IdentHostPair ih = ServerInstance->XLines->IdentSplit(xline_specific_mask);
+ return new GLine(set_time, duration, source, reason, ih.first, ih.second);
+ }
+};
+
+/** An XLineFactory specialized to generate ELine* pointers
+ */
+class ELineFactory : public XLineFactory
+{
+ public:
+ ELineFactory() : XLineFactory("E") { }
+
+ /** Generate an ELine
+ */
+ XLine* Generate(time_t set_time, long duration, std::string source, std::string reason, std::string xline_specific_mask)
+ {
+ IdentHostPair ih = ServerInstance->XLines->IdentSplit(xline_specific_mask);
+ return new ELine(set_time, duration, source, reason, ih.first, ih.second);
+ }
+};
+
+/** An XLineFactory specialized to generate KLine* pointers
+ */
+class KLineFactory : public XLineFactory
+{
+ public:
+ KLineFactory() : XLineFactory("K") { }
+
+ /** Generate a KLine
+ */
+ XLine* Generate(time_t set_time, long duration, std::string source, std::string reason, std::string xline_specific_mask)
+ {
+ IdentHostPair ih = ServerInstance->XLines->IdentSplit(xline_specific_mask);
+ return new KLine(set_time, duration, source, reason, ih.first, ih.second);
+ }
+};
+
+/** An XLineFactory specialized to generate QLine* pointers
+ */
+class QLineFactory : public XLineFactory
+{
+ public:
+ QLineFactory() : XLineFactory("Q") { }
+
+ /** Generate a QLine
+ */
+ XLine* Generate(time_t set_time, long duration, std::string source, std::string reason, std::string xline_specific_mask)
+ {
+ return new QLine(set_time, duration, source, reason, xline_specific_mask);
+ }
+};
+
+/** An XLineFactory specialized to generate ZLine* pointers
+ */
+class ZLineFactory : public XLineFactory
+{
+ public:
+ ZLineFactory() : XLineFactory("Z") { }
+
+ /** Generate a ZLine
+ */
+ XLine* Generate(time_t set_time, long duration, std::string source, std::string reason, std::string xline_specific_mask)
+ {
+ return new ZLine(set_time, duration, source, reason, xline_specific_mask);
+ }
+};
+
+