+/** An XLineFactory specialized to generate KLine* pointers
+ */
+class CoreExport KLineFactory : public XLineFactory
+{
+ public:
+ KLineFactory(InspIRCd* Instance) : XLineFactory(Instance, "K") { }
+
+ /** Generate a KLine
+ */
+ XLine* Generate(time_t set_time, long duration, const char* source, const char* reason, const char* xline_specific_mask)
+ {
+ IdentHostPair ih = ServerInstance->XLines->IdentSplit(xline_specific_mask);
+ return new KLine(ServerInstance, set_time, duration, source, reason, ih.first.c_str(), ih.second.c_str());
+ }
+};
+
+/** An XLineFactory specialized to generate QLine* pointers
+ */
+class CoreExport QLineFactory : public XLineFactory
+{
+ public:
+ QLineFactory(InspIRCd* Instance) : XLineFactory(Instance, "Q") { }
+
+ /** Generate a QLine
+ */
+ XLine* Generate(time_t set_time, long duration, const char* source, const char* reason, const char* xline_specific_mask)
+ {
+ return new QLine(ServerInstance, set_time, duration, source, reason, xline_specific_mask);
+ }
+};
+
+/** An XLineFactory specialized to generate ZLine* pointers
+ */
+class CoreExport ZLineFactory : public XLineFactory
+{
+ public:
+ ZLineFactory(InspIRCd* Instance) : XLineFactory(Instance, "Z") { }
+
+ /** Generate a ZLine
+ */
+ XLine* Generate(time_t set_time, long duration, const char* source, const char* reason, const char* xline_specific_mask)
+ {
+ return new ZLine(ServerInstance, set_time, duration, source, reason, xline_specific_mask);
+ }
+};