- this->DeleteFilter(MyConf.ReadValue("keyword", "pattern", index));
-
- std::string pattern = MyConf.ReadValue("keyword", "pattern", index);
- std::string reason = MyConf.ReadValue("keyword", "reason", index);
- std::string action = MyConf.ReadValue("keyword", "action", index);
- std::string flgs = MyConf.ReadValue("keyword", "flags", index);
- long gline_time = ServerInstance->Duration(MyConf.ReadValue("keyword", "duration", index));
- if (action.empty())
- action = "none";
- if (flgs.empty())
- flgs = "*";
-
- try
- {
- filters.push_back(ImplFilter(this, reason, action, gline_time, pattern, flgs));
- ServerInstance->Logs->Log("m_filter",DEFAULT,"Regular expression %s loaded.", pattern.c_str());
- }
- catch (ModuleException &e)
- {
- ServerInstance->Logs->Log("m_filter",DEFAULT,"Error in regular expression '%s': %s", pattern.c_str(), e.GetReason());
- }