]> git.netwichtig.de Git - user/henk/code/inspircd.git/blobdiff - src/modules/extra/m_regex_stdlib.cpp
Fix an oversight in mkversions that caused it to not update extras.
[user/henk/code/inspircd.git] / src / modules / extra / m_regex_stdlib.cpp
index 42e5c8bf12106ec09984e4582e39d2a339ef2138..aecb37dd673985d12eeb97f382dc9cd87ab4440c 100644 (file)
@@ -1,7 +1,10 @@
 /*
  * InspIRCd -- Internet Relay Chat Daemon
  *
- *   Copyright (C) 2012 ChrisTX <chris@rev-crew.info>
+ *   Copyright (C) 2019 Robby <robby@chatbelgie.be>
+ *   Copyright (C) 2013, 2016, 2018 Sadie Powell <sadie@witchery.services>
+ *   Copyright (C) 2013 Attila Molnar <attilamolnar@hush.com>
+ *   Copyright (C) 2012 ChrisTX <xpipe@hotmail.de>
  *
  * This file is part of InspIRCd.  InspIRCd is free software: you can
  * redistribute it and/or modify it under the terms of the GNU General Public
@@ -66,14 +69,14 @@ public:
 
        Version GetVersion() CXX11_OVERRIDE
        {
-               return Version("Regex Provider Module for std::regex", VF_VENDOR);
+               return Version("Provides a regular expression engine which uses the C++11 std::regex regular expression matching system.", VF_VENDOR);
        }
 
        void ReadConfig(ConfigStatus& status) CXX11_OVERRIDE
        {
                ConfigTag* Conf = ServerInstance->Config->ConfValue("stdregex");
-               std::string regextype = Conf->getString("type", "ecmascript");
 
+               const std::string regextype = Conf->getString("type", "ecmascript", 1);
                if (stdalgo::string::equalsci(regextype, "bre"))
                        ref.regextype = std::regex::basic;
                else if (stdalgo::string::equalsci(regextype, "ere"))
@@ -87,7 +90,7 @@ public:
                else
                {
                        if (!stdalgo::string::equalsci(regextype, "ecmascript"))
-                               ServerInstance->SNO->WriteToSnoMask('a', "WARNING: Non-existent regex engine '%s' specified. Falling back to ECMAScript.", regextype.c_str());
+                               ServerInstance->SNO->WriteToSnoMask('a', "WARNING: Nonexistent regex engine '%s' specified. Falling back to ECMAScript.", regextype.c_str());
                        ref.regextype = std::regex::ECMAScript;
                }
        }