- chanrec* chan = (chanrec*)dest;
- if (chan)
- {
- CUList *ulist;
- switch (status)
- {
- case '@':
- ulist = chan->GetOppedUsers();
- break;
- case '%':
- ulist = chan->GetHalfoppedUsers();
- break;
- case '+':
- ulist = chan->GetVoicedUsers();
- break;
- default:
- ulist = chan->GetUsers();
- break;
- }
-
- for (CUList::iterator i = ulist->begin(); i != ulist->end(); i++)
- {
- if ((IS_LOCAL(i->second)) && (user != i->second))
- {
- if (i->second->IsModeSet('d'))
- {
- exempt_list[i->second] = i->second;
- }
- }
- }
- }
+ /* not +d ? */
+ if (!i->first->IsModeSet(m1))
+ continue; /* deliver message */
+ /* matched both U-line only and regular bypasses */
+ if (is_bypasschar && is_bypasschar_uline)
+ continue; /* deliver message */
+
+ bool is_a_uline = i->first->server->IsULine();
+ /* 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 */
+
+ /* don't deliver message! */
+ details.exemptions.insert(i->first);