- /* not +d ? */
- if (!i->first->IsModeSet('d'))
- continue; /* deliver message */
- /* matched both U-line only and regular bypasses */
- if (is_bypasschar && is_bypasschar_uline)
- continue; /* deliver message */
-
- is_a_uline = ServerInstance->ULine(i->first->server);
- /* matched a U-line only bypass */
- if (is_bypasschar_uline && is_a_uline)
- continue; /* deliver message */
- /* matched a regular bypass */
- if (is_bypasschar && !is_a_uline)
- continue; /* deliver message */
-
- if (status && !strchr(chan->GetAllPrefixChars(i->first), status))
- continue;
+ case MessageTarget::TYPE_CHANNEL:
+ {
+ // If we have no bypasschars_uline in config, and this is a bypasschar (regular)
+ // Then it is obviously going to get through +d, no exemption list required
+ bool is_bypasschar = (deaf_bypasschars.find(details.text[0]) != std::string::npos);
+ if (deaf_bypasschars_uline.empty() && is_bypasschar)
+ return MOD_RES_PASSTHRU;
+
+ // If it matches both bypasschar and bypasschar_uline, it will get through.
+ bool is_bypasschar_uline = (deaf_bypasschars_uline.find(details.text[0]) != std::string::npos);
+ if (is_bypasschar && is_bypasschar_uline)
+ return MOD_RES_PASSTHRU;
+
+ return HandleChannel(user, target.Get<Channel>(), details.exemptions, is_bypasschar, is_bypasschar_uline);
+ }