diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/modules/extra/m_filter_pcre.cpp | 4 | ||||
-rw-r--r-- | src/modules/m_filter.cpp | 4 |
2 files changed, 7 insertions, 1 deletions
diff --git a/src/modules/extra/m_filter_pcre.cpp b/src/modules/extra/m_filter_pcre.cpp index 8823e385e..c2cc1f40f 100644 --- a/src/modules/extra/m_filter_pcre.cpp +++ b/src/modules/extra/m_filter_pcre.cpp @@ -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); diff --git a/src/modules/m_filter.cpp b/src/modules/m_filter.cpp index 9dda30f66..8feb5be41 100644 --- a/src/modules/m_filter.cpp +++ b/src/modules/m_filter.cpp @@ -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; } |