]> git.netwichtig.de Git - user/henk/code/inspircd.git/commitdiff
Fix for bug #613 reported by Casey, m_regex_glob's parameters were back to front!
authorbrain <brain@e03df62e-2008-0410-955e-edbf42e46eb7>
Sat, 4 Oct 2008 15:06:00 +0000 (15:06 +0000)
committerbrain <brain@e03df62e-2008-0410-955e-edbf42e46eb7>
Sat, 4 Oct 2008 15:06:00 +0000 (15:06 +0000)
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@10620 e03df62e-2008-0410-955e-edbf42e46eb7

src/modules/m_filter.cpp
src/modules/m_regex_glob.cpp

index a44785b140b8a572ecc12841550903f775f2ba7e..1c92317386b95efb539f51540e8b412b0da9c17f 100644 (file)
@@ -563,12 +563,13 @@ class ModuleFilter : public FilterBase
                for (std::vector<ImplFilter>::iterator index = filters.begin(); index != filters.end(); index++)
                {
                        /* Skip ones that dont apply to us */
-
                        if (!FilterBase::AppliesToMe(user, dynamic_cast<FilterResult*>(&(*index)), flgs))
                                continue;
 
+                       //ServerInstance->Logs->Log("m_filter", DEBUG, "Match '%s' against '%s'", text.c_str(), index->freeform.c_str());
                        if (index->regex->Matches(text))
                        {
+                               //ServerInstance->Logs->Log("m_filter", DEBUG, "MATCH");
                                fr = *index;
                                if (index != filters.begin())
                                {
@@ -578,6 +579,7 @@ class ModuleFilter : public FilterBase
                                }
                                return &fr;
                        }
+                       //ServerInstance->Logs->Log("m_filter", DEBUG, "NO MATCH");
                }
                return NULL;
        }
index 8990995cf7fd91da8f01fee87d30a33574410967..d72d49896638a20026f358eca8ccc7b7562fece3 100644 (file)
@@ -30,7 +30,7 @@ public:
 
        virtual bool Matches(const std::string& text)
        {
-               return InspIRCd::Match(this->regex_string, text);
+               return InspIRCd::Match(text, this->regex_string);
        }
 };