1 /* +------------------------------------+
2 * | Inspire Internet Relay Chat Daemon |
3 * +------------------------------------+
5 * InspIRCd: (C) 2002-2009 InspIRCd Development Team
6 * See: http://www.inspircd.org/wiki/index.php/Credits
8 * This program is free but copyrighted software; see
9 * the file COPYING for details.
11 * ---------------------------------------------------
19 class Regex : public classbase
22 std::string regex_string; // The raw uncompiled regex string.
23 InspIRCd* ServerInstance;
25 // Constructor may as well be protected, as this class is abstract.
26 Regex(const std::string& rx, InspIRCd* Me) : regex_string(rx), ServerInstance(Me)
36 virtual bool Matches(const std::string& text) = 0;
38 const std::string& GetRegexString() const
44 class RegexFactoryRequest : public Request
52 RegexFactoryRequest(Module* Me, Module* Target, const std::string& rx) : Request(Me, Target, "REGEX"), regex(rx), result(NULL)
56 const std::string& GetRegex() const
68 class RegexNameRequest : public Request
71 RegexNameRequest(Module* Me, Module* Target) : Request(Me, Target, "REGEX-NAME")