aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGravatar Sadie Powell2021-11-14 23:42:34 +0000
committerGravatar Sadie Powell2021-11-14 23:42:34 +0000
commite6d2a291e8f987de9cc6f73e2c4b7cbbd12e7907 (patch)
treeff59679891e74e06dd51c6d43a5e3275c2be69d0
parentMerge branch 'insp3' into master. (diff)
Revert "Add regex_pcre compatibility to regex_pcre2".
This reverts commit 3fa012b75b14abd69c7bc67c27ae50cb9ba4c343.
-rw-r--r--docs/conf/modules.conf.example4
-rw-r--r--src/modules/extra/m_regex_pcre2.cpp19
2 files changed, 0 insertions, 23 deletions
diff --git a/docs/conf/modules.conf.example b/docs/conf/modules.conf.example
index 25f4a17d6..36bd79d0e 100644
--- a/docs/conf/modules.conf.example
+++ b/docs/conf/modules.conf.example
@@ -1758,10 +1758,6 @@
# module. You must have at least 1 provider loaded to use the filter or
# R-line modules.
#<module name="regex_pcre2">
-#
-# If you were using PCRE in v3 or earlier you can enable this to try to
-# keep compatibility with your regular expressions from older versions.
-#<pcre2 compat="yes">
#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#
# Regular Expression Provider for RE2 Regular Expressions.
diff --git a/src/modules/extra/m_regex_pcre2.cpp b/src/modules/extra/m_regex_pcre2.cpp
index c0acd627d..a8e9c535a 100644
--- a/src/modules/extra/m_regex_pcre2.cpp
+++ b/src/modules/extra/m_regex_pcre2.cpp
@@ -75,34 +75,15 @@ class PCRE2Pattern final
}
};
-class PCRECompatEngine final
- : public Regex::Engine
-{
-public:
- PCRECompatEngine(Module* Creator, const std::string& Name)
- : Regex::Engine(Creator, Name)
- {
- if (!ServerInstance->Config->ConfValue("pcre2")->getBool("compat"))
- DisableAutoRegister();
- }
-
- Regex::PatternPtr Create(const std::string& pattern, uint8_t options) override
- {
- return std::make_shared<PCRE2Pattern>(pattern, options);
- }
-};
-
class ModuleRegexPCRE2 final
: public Module
{
private:
- PCRECompatEngine compatregex;
Regex::SimpleEngine<PCRE2Pattern> regex;
public:
ModuleRegexPCRE2()
: Module(VF_VENDOR, "Provides the pcre2 regular expression engine which uses the PCRE2 library.")
- , compatregex(this, "pcre")
, regex(this, "pcre2")
{
}