added MODE_AUDITORIUM /names refresh on op/deop
authorpk910 <philipp@zoelle1.de>
Tue, 28 Jun 2011 20:04:25 +0000 (22:04 +0200)
committerpk910 <philipp@zoelle1.de>
Tue, 28 Jun 2011 20:04:25 +0000 (22:04 +0200)
ircd/channel.c
ircd/m_join.c
ircd/m_svsjoin.c

index d1511be47ab30321f726109593655e20f5a2b071..c839fa2285c650bcae9ce27e3b082997c96d2e5c 100644 (file)
@@ -2339,9 +2339,9 @@ struct ParseState {
   struct Membership *member;
   int parc;
   char **parv;
-  unsigned int flags;
+  ulong64 flags;
   ulong64 dir;
-  unsigned int done;
+  ulong64 done;
   ulong64 add;
   ulong64 del;
   int args_used;
@@ -2349,7 +2349,7 @@ struct ParseState {
   int numbans;
   struct Ban banlist[MAXPARA];
   struct {
-    unsigned int flag;
+    ulong64 flag;
     unsigned short oplevel;
     struct Client *client;
   } cli_change[MAXPARA];
@@ -3515,6 +3515,10 @@ mode_process_clients(struct ParseState *state)
     modebuf_mode_client(state->mbuf, state->cli_change[i].flag,
                        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));
+       }
   } /* for (i = 0; state->cli_change[i].flags; i++) */
 }
 
index 6a93769cc55de697d612fd52ba7f92a0c1b18575..3bc64b6e3fce267b742a116377ebd2671630267b 100644 (file)
@@ -354,7 +354,7 @@ int m_join(struct Client *cptr, struct Client *sptr, int parc, char *parv[])
                 chptr->topic_time);
     }
 
-    do_names(sptr, chptr, NAMES_ALL|NAMES_EON); /* send /names list */
+    do_names(sptr, chptr, NAMES_ALL|NAMES_EON|(((chptr->mode.mode & MODE_AUDITORIUM) && !(flags & CHFL_CHANOP)) ? NAMES_OPS : 0)); /* send /names list */
   }
 
   joinbuf_flush(&join); /* must be first, if there's a JOIN 0 */
index 94156fdcd42ed0d9b14149ac06bc05d0fc471f0b..f79e4cc271ec5afdb6e9825d699b30244e006fe1 100644 (file)
@@ -87,7 +87,7 @@ int m_svsjoin(struct Client *cptr, struct Client *sptr, int parc, char *parv[])
         send_reply(acptr, RPL_TOPIC, chptr->chname, chptr->topic);
         send_reply(acptr, RPL_TOPICWHOTIME, chptr->chname, chptr->topic_nick, chptr->topic_time);
     }
-    do_names(acptr, chptr, NAMES_ALL|NAMES_EON);
+    do_names(acptr, chptr, NAMES_ALL|NAMES_EON|(((chptr->mode.mode & MODE_AUDITORIUM) && !(flags & CHFL_CHANOP)) ? NAMES_OPS : 0));
 
     joinbuf_flush(&join);
     joinbuf_flush(&create);
@@ -154,7 +154,7 @@ signed int ms_svsjoin(struct Client* cptr, struct Client* sptr, signed int parc,
         send_reply(acptr, RPL_TOPIC, chptr->chname, chptr->topic);
         send_reply(acptr, RPL_TOPICWHOTIME, chptr->chname, chptr->topic_nick, chptr->topic_time);
     }
-    do_names(acptr, chptr, NAMES_ALL|NAMES_EON);
+    do_names(acptr, chptr, NAMES_ALL|NAMES_EON|(((chptr->mode.mode & MODE_AUDITORIUM) && !(flags & CHFL_CHANOP)) ? NAMES_OPS : 0));
 
     joinbuf_flush(&join);
     joinbuf_flush(&create);