+ ModResult PreText(User* user,void* dest,int target_type, std::string &text, char status, CUList &exempt_list, int silence_type)
+ {
+ if (target_type == TYPE_USER && IS_LOCAL(((User*)dest)))
+ {
+ return MatchPattern((User*)dest, user, silence_type);
+ }
+ else if (target_type == TYPE_CHANNEL)
+ {
+ Channel* chan = (Channel*)dest;
+ if (chan)
+ {
+ this->OnBuildExemptList((silence_type == SILENCE_PRIVATE ? MSG_PRIVMSG : MSG_NOTICE), chan, user, status, exempt_list, "");
+ }
+ }
+ return MOD_RES_PASSTHRU;
+ }
+
+ ModResult OnUserPreMessage(User* user,void* dest,int target_type, std::string &text, char status, CUList &exempt_list)
+ {
+ return PreText(user, dest, target_type, text, status, exempt_list, SILENCE_PRIVATE);
+ }