* | Inspire Internet Relay Chat Daemon |
* +------------------------------------+
*
- * InspIRCd: (C) 2002-2009 InspIRCd Development Team
- * See: http://www.inspircd.org/wiki/index.php/Credits
+ * InspIRCd: (C) 2002-2010 InspIRCd Development Team
+ * See: http://wiki.inspircd.org/Credits
*
* This program is free but copyrighted software; see
* the file COPYING for details.
{
protected:
std::string regex_string; // The raw uncompiled regex string.
- InspIRCd* ServerInstance;
// Constructor may as well be protected, as this class is abstract.
- Regex(const std::string& rx, InspIRCd* Me) : regex_string(rx), ServerInstance(Me)
+ Regex(const std::string& rx) : regex_string(rx)
{
}
}
};
-class RegexFactoryRequest : public Request
+class RegexFactory : public DataProvider
{
-private:
- std::string regex;
-
-public:
- Regex* result;
-
- RegexFactoryRequest(Module* Me, Module* Target, const std::string& rx) : Request(Me, Target, "REGEX"), regex(rx), result(NULL)
- {
- }
+ public:
+ RegexFactory(Module* Creator, const std::string& Name) : DataProvider(Creator, Name) {}
- const std::string& GetRegex() const
- {
- return regex;
- }
-
- Regex* Create()
- {
- Send();
- return this->result;
- }
-};
-
-class RegexNameRequest : public Request
-{
-public:
- RegexNameRequest(Module* Me, Module* Target) : Request(Me, Target, "REGEX-NAME")
- {
- }
+ virtual Regex* Create(const std::string& expr) = 0;
};
#endif