From 82a62fd8cb49481c5163a22f7659f1e91d98778a Mon Sep 17 00:00:00 2001 From: brain Date: Mon, 28 May 2007 22:42:33 +0000 Subject: Make the flags work git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@7180 e03df62e-2008-0410-955e-edbf42e46eb7 --- src/modules/extra/m_filter_pcre.cpp | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'src/modules/extra') diff --git a/src/modules/extra/m_filter_pcre.cpp b/src/modules/extra/m_filter_pcre.cpp index 7faa4a40b..8823e385e 100644 --- a/src/modules/extra/m_filter_pcre.cpp +++ b/src/modules/extra/m_filter_pcre.cpp @@ -57,10 +57,15 @@ class ModuleFilterPCRE : public FilterBase { } - virtual FilterResult* FilterMatch(const std::string &text, int flags) + virtual FilterResult* FilterMatch(userrec* user, const std::string &text, int flags) { for (std::vector::iterator index = filters.begin(); index != filters.end(); index++) { + /* Skip ones that dont apply to us */ + + if (!FilterBase::AppliesToMe(user, dynamic_cast(&(*index)), flags)) + continue; + if (pcre_exec(index->regexp, NULL, text.c_str(), text.length(), 0, 0, NULL, 0) > -1) { fr = *index; -- cgit v1.2.3