- const char* target;
-
- if(filt.action.empty())
- filt.action = "none";
-
- if (target_type == TYPE_USER)
- {
- userrec* t = (userrec*)dest;
- target = t->nick;
- }
- else if (target_type == TYPE_CHANNEL)
- {
- chanrec* t = (chanrec*)dest;
- target = t->name;
- }
- else
- {
- target = "";
- }
-
- ServerInstance->Log(DEFAULT, "Filter: %s had their notice filtered, target was %s: %s Action: %s", user->nick, target, filt.reason.c_str(), filt.action.c_str());
-
- if (filt.action == "block")
- {
- Srv->WriteOpers("Filter: %s had their notice filtered, target was %s: %s", user->nick, target, filt.reason.c_str());
- user->WriteServ("NOTICE "+std::string(user->nick)+" :Your notice has been filtered and opers notified: "+filt.reason);
- }
- else if (filt.action == "kill")
- {
- userrec::QuitUser(Srv, user, filt.reason);
- }
-
- return 1;