1 /* +------------------------------------+
2 * | Inspire Internet Relay Chat Daemon |
3 * +------------------------------------+
5 * InspIRCd: (C) 2002-2010 InspIRCd Development Team
6 * See: http://wiki.inspircd.org/Credits
8 * This program is free but copyrighted software; see
9 * the file COPYING for details.
11 * ---------------------------------------------------
17 /* $ModDesc: Regex module using plain wildcard matching. */
19 class GlobRegex : public Regex
22 GlobRegex(const std::string& rx) : Regex(rx)
30 virtual bool Matches(const std::string& text)
32 return InspIRCd::Match(text, this->regex_string);
36 class GlobFactory : public RegexFactory
39 Regex* Create(const std::string& expr)
41 return new GlobRegex(expr);
44 GlobFactory(Module* m) : RegexFactory(m, "regex/glob") {}
47 class ModuleRegexGlob : public Module
51 ModuleRegexGlob() : gf(this) {
52 ServerInstance->Modules->AddService(gf);
57 return Version("Regex module using plain wildcard matching.", VF_VENDOR);
61 MODULE_INIT(ModuleRegexGlob)