]> git.netwichtig.de Git - user/henk/code/inspircd.git/blobdiff - src/modules/m_regex.h
Fix IPv6 cloaking in compatability mode (was using the wrong xtab confusor)
[user/henk/code/inspircd.git] / src / modules / m_regex.h
index 969c4920bc1e328ed29b21b5e71f3b972154a7fc..523f9f0d32f4bbce6ca44a65feba28a0cb916a61 100644 (file)
@@ -2,7 +2,7 @@
  *       | Inspire Internet Relay Chat Daemon |
  *       +------------------------------------+
  *
- *  InspIRCd: (C) 2002-2009 InspIRCd Development Team
+ *  InspIRCd: (C) 2002-2010 InspIRCd Development Team
  * See: http://wiki.inspircd.org/Credits
  *
  * This program is free but copyrighted software; see
@@ -40,38 +40,12 @@ public:
        }
 };
 
-class RegexFactoryRequest : public Request
+class RegexFactory : public DataProvider
 {
-private:
-       std::string regex;
+ public:
+       RegexFactory(Module* Creator, const std::string& Name) : DataProvider(Creator, Name) {}
 
-public:
-       Regex* result;
-
-       RegexFactoryRequest(Module* Me, Module* Target, const std::string& rx) : Request(Me, Target, "REGEX"), regex(rx), result(NULL)
-       {
-       }
-
-       const std::string& GetRegex() const
-       {
-               return regex;
-       }
-
-       Regex* Create()
-       {
-               Send();
-               return this->result;
-       }
-};
-
-class RegexNameRequest : public Request
-{
-public:
-       std::string result;
-       RegexNameRequest(Module* Me, Module* Target) : Request(Me, Target, "REGEX-NAME")
-       {
-               Send(); 
-       }
+       virtual Regex* Create(const std::string& expr) = 0;
 };
 
 #endif