send PART event for opped or voiced users to ALL users in the channel (fixed status...
[ircu2.10.12-pk.git] / ircd / channel.c
index 65d37b22afb8f0b1db2dd003035215827ab10a13..aa266307b4dbbc5ad26739aabfb1b31eeb20b2da 100644 (file)
@@ -3916,8 +3916,11 @@ joinbuf_join(struct JoinBuf *jbuf, struct Channel *chan, unsigned int flags)
     SetUserParting(member);
 
     /* Send notification to channel */
-       if((chan->mode.mode & MODE_AUDITORIUM) && !(flags & CHFL_VOICED_OR_OPPED)) {
-         //do noting here
+       if((chan->mode.mode & MODE_AUDITORIUM) && !(member->status & CHFL_VOICED_OR_OPPED)) {
+         //send part to ops only
+         sendcmdto_channel_butserv_butone(jbuf->jb_source, CMD_PART, chan, NULL, SKIP_NONOPS, "%H :%s", chan, jbuf->jb_comment);
+         if(MyUser(jbuf->jb_source))
+                 sendcmdto_one(jbuf->jb_source, CMD_PART, jbuf->jb_source, "%H :%s", chan, jbuf->jb_comment);
     } else if (!(flags & (CHFL_ZOMBIE | CHFL_DELAYED)))
       sendcmdto_channel_butserv_butone(jbuf->jb_source, CMD_PART, chan, NULL, 0,
                                (flags & CHFL_BANNED || !jbuf->jb_comment) ?