only ops should be able to set/remove MODE_AUDITORIUM (+u)
authorpk910 <philipp@zoelle1.de>
Tue, 28 Jun 2011 20:40:31 +0000 (22:40 +0200)
committerpk910 <philipp@zoelle1.de>
Tue, 28 Jun 2011 20:42:21 +0000 (22:42 +0200)
ircd/channel.c

index 33cfb82ffff9f1dd11a70139b71a122d2fb0065f..3f563c326168645878d85aee5c29070dfae8deb4 100644 (file)
@@ -3540,6 +3540,9 @@ mode_parse_mode(struct ParseState *state, ulong64 *flag_p)
   /* Local users are not permitted to change registration status */
   if (flag_p[0] == MODE_REGISTERED && !(state->flags & MODE_PARSE_FORCE) && MyUser(state->sptr))
     return;
   /* Local users are not permitted to change registration status */
   if (flag_p[0] == MODE_REGISTERED && !(state->flags & MODE_PARSE_FORCE) && MyUser(state->sptr))
     return;
+       
+  if(flag_p[0] == MODE_AUDITORIUM)
+    audit_chan_users(state, flag_p);
 
   if (state->dir == MODE_ADD) {
     state->add |= flag_p[0];
 
   if (state->dir == MODE_ADD) {
     state->add |= flag_p[0];
@@ -3674,10 +3677,6 @@ mode_parse(struct ModeBuf *mbuf, struct Client *cptr, struct Client *sptr,
       case 'l': /* deal with limits */
        mode_parse_limit(&state, flag_p);
        break;
       case 'l': /* deal with limits */
        mode_parse_limit(&state, flag_p);
        break;
-         case 'u': /* deal with not oped members */
-    audit_chan_users(&state, flag_p);
-       mode_parse_mode(&state, flag_p);
-    break;
       case 'a': /* deal with limits */
        mode_parse_access(&state, flag_p);
        break;
       case 'a': /* deal with limits */
        mode_parse_access(&state, flag_p);
        break;