From f0015ee6396ad4dce2a858df1a7ee24b457a467b Mon Sep 17 00:00:00 2001 From: Bram Matthys Date: Thu, 10 Nov 2016 09:09:33 +0100 Subject: [PATCH] Usermode +d (deaf) was broken. Clients were still receiving channel messages. Reported by acidvegas, patch from Gottem (#4764). --- src/send.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/send.c b/src/send.c index ef997959c..1ab57bec0 100644 --- a/src/send.c +++ b/src/send.c @@ -362,12 +362,12 @@ void sendto_channelprefix_butone(aClient *one, aClient *from, aChannel *chptr, for (lp = chptr->members; lp; lp = lp->next) { acptr = lp->cptr; - if (acptr->from == one) - continue; /* ...was the one I should skip - or user not not a channel op */ + /* skip the one and deaf clients (unless sendanyways is set) */ + if (acptr->from == one || (IsDeaf(acptr) && !(sendanyways == 1))) + continue; if (!prefix) goto good; - if ((prefix & PREFIX_HALFOP) && (lp->flags & CHFL_HALFOP)) + if ((prefix & PREFIX_HALFOP) && (lp->flags & CHFL_HALFOP)) goto good; if ((prefix & PREFIX_VOICE) && (lp->flags & CHFL_VOICE)) goto good;