- std::string pattern = MyConf->ReadValue("keyword","pattern",index);
- if (Srv->MatchText(text,pattern))
- {
- std::string target = "";
- if (target_type == TYPE_USER)
- {
- userrec* t = (userrec*)dest;
- target = std::string(t->nick);
- }
- else if (target_type == TYPE_CHANNEL)
- {
- chanrec* t = (chanrec*)dest;
- target = std::string(t->name);
- }
- Srv->SendOpers(std::string("FILTER: ")+std::string(user->nick)+
- std::string(" had their notice filtered, target was ")+
- target+": "+MyConf->ReadValue("keyword","reason",index));
- Srv->Log(DEFAULT,std::string("FILTER: ")+std::string(user->nick)+
- std::string(" had their notice filtered, target was ")+
- target+": "+MyConf->ReadValue("keyword","reason",index));
- return 1;
- }