bugfixes for the last commits
authorpk910 <philipp@zoelle1.de>
Tue, 28 Jun 2011 20:33:38 +0000 (22:33 +0200)
committerpk910 <philipp@zoelle1.de>
Tue, 28 Jun 2011 20:33:38 +0000 (22:33 +0200)
ircd/channel.c
ircd/m_names.c

index c839fa2285c650bcae9ce27e3b082997c96d2e5c..33cfb82ffff9f1dd11a70139b71a122d2fb0065f 100644 (file)
@@ -3516,8 +3516,8 @@ mode_process_clients(struct ParseState *state)
                        state->cli_change[i].client,
                         state->cli_change[i].oplevel);
        
-       if(MyUser(state->sptr) && (state->chptr->mode.mode & MODE_AUDITORIUM) && (state->cli_change[i].flag & MODE_CHANOP)) {
-               do_names(state->sptr, state->chptr, NAMES_ALL|NAMES_EON|((member->status & MODE_CHANOP) ? 0 : NAMES_OPS));
+       if(MyUser(member->user) && (member->channel->mode.mode & MODE_AUDITORIUM) && (state->cli_change[i].flag & MODE_CHANOP)) {
+               do_names(member->user, member->channel, NAMES_ALL|NAMES_EON|((member->status & MODE_CHANOP) ? 0 : NAMES_OPS));
        }
   } /* for (i = 0; state->cli_change[i].flags; i++) */
 }
@@ -3948,7 +3948,7 @@ joinbuf_join(struct JoinBuf *jbuf, struct Channel *chan, unsigned int flags)
          }
        }
        
-       if((chan->mode.mode & MODE_DELJOINS) && !(flags & CHFL_VOICED_OR_OPPED)) {
+       if((chan->mode.mode & MODE_AUDITORIUM) && !(flags & CHFL_VOICED_OR_OPPED)) {
                //we have to send this JOIN event to ops only...                  
                sendcmdto_channel_butserv_butone(jbuf->jb_source, CMD_JOIN, chan, NULL, SKIP_NONOPS, "%H", chan);
                if(MyUser(jbuf->jb_source))
index 13950fc22a32ce22468729a2997b4d28b474828e..eda82851e847950ac54db87f858894092b86a12a 100644 (file)
@@ -252,10 +252,9 @@ int m_names(struct Client* cptr, struct Client* sptr, int parc, char* parv[])
         if (!ShowChannel(sptr, ch2ptr))
           continue;                 /* Don't show secret chans. */ 
         else if ((member = find_channel_member(sptr, ch2ptr))) {
-                 
-          do_names(sptr, ch2ptr, showingdelayed|NAMES_ALL|((chptr->mode.mode & MODE_AUDITORIUM) && !(member->status & MODE_CHANOP) ? NAMES_OPS : 0)); /* Full list if we're in this chan. */
+          do_names(sptr, ch2ptr, showingdelayed|NAMES_ALL|((ch2ptr->mode.mode & MODE_AUDITORIUM) && !(member->status & MODE_CHANOP) ? NAMES_OPS : 0)); /* Full list if we're in this chan. */
         } else
-          do_names(sptr, ch2ptr, showingdelayed|NAMES_VIS|((chptr->mode.mode & MODE_AUDITORIUM) ? NAMES_OPS : 0));
+          do_names(sptr, ch2ptr, showingdelayed|NAMES_VIS|((ch2ptr->mode.mode & MODE_AUDITORIUM) ? NAMES_OPS : 0));
       } 
 
       /* List all remaining users on channel '*' */