]> git.netwichtig.de Git - user/henk/code/inspircd.git/commitdiff
No flags now means all flags when in the config, so that filters defined in older...
authorbrain <brain@e03df62e-2008-0410-955e-edbf42e46eb7>
Mon, 28 May 2007 23:12:01 +0000 (23:12 +0000)
committerbrain <brain@e03df62e-2008-0410-955e-edbf42e46eb7>
Mon, 28 May 2007 23:12:01 +0000 (23:12 +0000)
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@7182 e03df62e-2008-0410-955e-edbf42e46eb7

src/modules/extra/m_filter_pcre.cpp
src/modules/m_filter.cpp

index 8823e385ee8e2647730265168d775785a156ed2f..c2cc1f40febe601f770adcb5de98486fad0c65e9 100644 (file)
@@ -140,6 +140,10 @@ class ModuleFilterPCRE : public FilterBase
                        std::string action = MyConf.ReadValue("keyword", "action", index);
                        std::string flags = MyConf.ReadValue("keyword", "flags", index);
                        long gline_time = ServerInstance->Duration(MyConf.ReadValue("keyword", "duration", index).c_str());
+                       if (action.empty())
+                               action = "none";
+                       if (flags.empty())
+                               flags = "*";
 
                        re = pcre_compile(pattern.c_str(),0,&error,&erroffset,NULL);
 
index 9dda30f66dbd875c568a3148f22345536db17b96..8feb5be41faad343d0da79083f688fba2f4b7377 100644 (file)
@@ -107,8 +107,10 @@ class ModuleFilter : public FilterBase
                        std::string do_action = MyConf->ReadValue("keyword","action",index);
                        std::string flags = MyConf->ReadValue("keyword","flags",index);
                        long gline_time = ServerInstance->Duration(MyConf->ReadValue("keyword","duration",index).c_str());
-                       if (do_action == "")
+                       if (do_action.empty())
                                do_action = "none";
+                       if (flags.empty())
+                               flags = "*";
                        FilterResult* x = new FilterResult(pattern, reason, do_action, gline_time, flags);
                        filters[pattern] = x;
                }