- std::string target = "";
- std::string reason = MyConf->ReadValue("keyword","reason",index);
- std::string do_action = MyConf->ReadValue("keyword","action",index);
-
- if (do_action == "")
- do_action = "none";
-
- 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);
- }
- if (do_action == "block")
- {
- Srv->SendOpers(std::string("Filter: ")+std::string(user->nick)+
- std::string(" had their notice filtered, target was ")+
- target+": "+reason);
- user->WriteServ("NOTICE "+std::string(user->nick)+
- " :Your notice has been filtered and opers notified: "+reason);
- }
- Srv->Log(DEFAULT,std::string("Filter: ")+std::string(user->nick)+
- std::string(" had their notice filtered, target was ")+
- target+": "+reason+" Action: "+do_action);
-
- if (do_action == "kill")
- {
- userrec::QuitUser(user,reason);
- }
- return 1;