diff options
Diffstat (limited to 'include')
-rw-r--r-- | include/config.h | 2 | ||||
-rw-r--r-- | include/module.h | 1 | ||||
-rw-r--r-- | include/regexpr.h | 44 | ||||
-rw-r--r-- | include/services.h | 1 | ||||
-rw-r--r-- | include/xline.h | 2 |
5 files changed, 4 insertions, 46 deletions
diff --git a/include/config.h b/include/config.h index ccb04ce55..903c41120 100644 --- a/include/config.h +++ b/include/config.h @@ -103,6 +103,8 @@ namespace Configuration time_t TimeoutCheck; /* options:usestrictprivmsg */ bool UseStrictPrivmsg; + /* flag for options:regexengine */ + std::regex::flag_type regex_flags; /* either "/msg " or "/" */ Anope::string StrictPrivmsg; diff --git a/include/module.h b/include/module.h index 7bfc40cfe..571cf4a6a 100644 --- a/include/module.h +++ b/include/module.h @@ -31,7 +31,6 @@ #include "modules.h" #include "opertype.h" #include "protocol.h" -#include "regexpr.h" #include "regchannel.h" #include "serialize.h" #include "servers.h" diff --git a/include/regexpr.h b/include/regexpr.h deleted file mode 100644 index d8b96d750..000000000 --- a/include/regexpr.h +++ /dev/null @@ -1,44 +0,0 @@ -/* - * - * (C) 2003-2014 Anope Team - * Contact us at team@anope.org - * - * Please read COPYING and README for further details. - * - * Based on the original code of Epona by Lara. - * Based on the original code of Services by Andy Church. - * - */ - -#pragma once - -#include "services.h" -#include "anope.h" -#include "service.h" - -class RegexException : public CoreException -{ - public: - RegexException(const Anope::string &reason = "") : CoreException(reason) { } - - virtual ~RegexException() throw() { } -}; - -class CoreExport Regex -{ - Anope::string expression; - protected: - Regex(const Anope::string &expr) : expression(expr) { } - public: - virtual ~Regex() { } - const Anope::string &GetExpression() { return expression; } - virtual bool Matches(const Anope::string &str) = 0; -}; - -class CoreExport RegexProvider : public Service -{ - public: - RegexProvider(Module *o, const Anope::string &n) : Service(o, "Regex", n) { } - virtual Regex *Compile(const Anope::string &) = 0; -}; - diff --git a/include/services.h b/include/services.h index 45eb84c32..5965cea09 100644 --- a/include/services.h +++ b/include/services.h @@ -41,6 +41,7 @@ #include <set> #include <algorithm> #include <iterator> +#include <regex> #include "defs.h" diff --git a/include/xline.h b/include/xline.h index ae9a1919b..3a1a190c3 100644 --- a/include/xline.h +++ b/include/xline.h @@ -18,7 +18,7 @@ class CoreExport XLine : public Serializable void InitRegex(); public: Anope::string mask; - Regex *regex; + std::regex *regex; Anope::string by; time_t created; time_t expires; |