diff options
author | Peter Powell <petpow@saberuk.com> | 2018-07-24 18:29:43 +0100 |
---|---|---|
committer | Peter Powell <petpow@saberuk.com> | 2018-07-24 21:55:10 +0100 |
commit | 97a1d6429a735eb279496df010d04e3f42aa4e22 (patch) | |
tree | a201d8ffe678e5929a2b1d373eef8082d8c6150d /src/modules/extra/m_regex_stdlib.cpp | |
parent | 7a24867d97c6ffe75b155d96dedb11b30b904a33 (diff) |
Make more config stuff case insensitive.
Diffstat (limited to 'src/modules/extra/m_regex_stdlib.cpp')
-rw-r--r-- | src/modules/extra/m_regex_stdlib.cpp | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/modules/extra/m_regex_stdlib.cpp b/src/modules/extra/m_regex_stdlib.cpp index 7a888ed72..42e5c8bf1 100644 --- a/src/modules/extra/m_regex_stdlib.cpp +++ b/src/modules/extra/m_regex_stdlib.cpp @@ -74,19 +74,19 @@ public: ConfigTag* Conf = ServerInstance->Config->ConfValue("stdregex"); std::string regextype = Conf->getString("type", "ecmascript"); - if(regextype == "bre") + if (stdalgo::string::equalsci(regextype, "bre")) ref.regextype = std::regex::basic; - else if(regextype == "ere") + else if (stdalgo::string::equalsci(regextype, "ere")) ref.regextype = std::regex::extended; - else if(regextype == "awk") + else if (stdalgo::string::equalsci(regextype, "awk")) ref.regextype = std::regex::awk; - else if(regextype == "grep") + else if (stdalgo::string::equalsci(regextype, "grep")) ref.regextype = std::regex::grep; - else if(regextype == "egrep") + else if (stdalgo::string::equalsci(regextype, "egrep")) ref.regextype = std::regex::egrep; else { - if(regextype != "ecmascript") + if (!stdalgo::string::equalsci(regextype, "ecmascript")) ServerInstance->SNO->WriteToSnoMask('a', "WARNING: Non-existent regex engine '%s' specified. Falling back to ECMAScript.", regextype.c_str()); ref.regextype = std::regex::ECMAScript; } |