- 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 (f->action == "block")
- {
- ServerInstance->WriteOpers(std::string("FILTER: ")+user->nick+" had their notice filtered, target was "+target+": "+f->reason);
- user->WriteServ("NOTICE "+std::string(user->nick)+" :Your notice has been filtered and opers notified: "+f->reason);
- }
- ServerInstance->Log(DEFAULT,"FILTER: "+std::string(user->nick)+std::string(" had their notice filtered, target was ")+target+": "+f->reason+" Action: "+f->action);
+ /* Skip ones that dont apply to us */
+ if (!FilterBase::AppliesToMe(user, index->second, iflags))
+ continue;