- const char* 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 = t->nick;
- }
- else if (target_type == TYPE_CHANNEL)
- {
- chanrec* t = (chanrec*)dest;
- target = t->name;
- }
- else
- {
- target = "";
- }
-
- if (do_action == "block")
- {
- ServerInstance->WriteOpers("Filter: %s had their notice filtered, target was %s: %s", user->nick, target, reason.c_str());
- user->WriteServ("NOTICE "+std::string(user->nick)+" :Your notice has been filtered and opers notified: "+reason);
- }
-
- log(DEFAULT, "Filter: %s had their notice filtered, target was %s: %s Action: %s", user->nick, target, reason.c_str(), do_action.c_str());
-
- if (do_action == "kill")
- {
- userrec::QuitUser(ServerInstance,user,reason);
- }
- return 1;