- chanrec* chan = (chanrec*)dest;
- if (chan)
- {
- this->OnBuildExemptList(MSG_PRIVMSG, chan, user, status, exempt_list);
- }
+ /* 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;
+
+ /* don't deliver message! */
+ exempt_list.insert(i->first);