Ver Fonte

* If the chan is both +voice and +voicebitch, only voice users who actually have flag: +v

Bryan Drewery há 16 anos atrás
pai
commit
07bc8804d2
2 ficheiros alterados com 6 adições e 2 exclusões
  1. 3 1
      src/mod/irc.mod/chan.c
  2. 3 1
      src/mod/irc.mod/irc.c

+ 3 - 1
src/mod/irc.mod/chan.c

@@ -2716,7 +2716,9 @@ static int gotjoin(char *from, char *chname)
             if (m->user) {
               if (!(m->flags & EVOICE) &&
                   (
-                   (channel_voice(chan) && !chk_devoice(fr)) ||
+                   /* +voice: Voice all clients who are not flag:+q. If the chan is +voicebitch, only op flag:+v clients */
+                   (channel_voice(chan) && !chk_devoice(fr) && (!channel_voicebitch(chan) || (channel_voicebitch(chan) && chk_voice(fr, chan)))) ||
+                   /* Or, if the channel is -voice but they still qualify to be voiced */
                    (!channel_voice(chan) && !privchan(fr, chan, PRIV_VOICE) && chk_voice(fr, chan))
                   )
                  ) {

+ 3 - 1
src/mod/irc.mod/irc.c

@@ -1579,7 +1579,9 @@ check_expired_chanstuff(struct chanset_t *chan)
               if (!glob_bot(fr)) {
                 if (!chan_sentvoice(m) && !(m->flags & EVOICE) && 
                     (
-                     (channel_voice(chan) && !chk_devoice(fr)) ||
+                     /* +voice: Voice all clients who are not flag:+q. If the chan is +voicebitch, only op flag:+v clients */
+                     (channel_voice(chan) && !chk_devoice(fr) && (!channel_voicebitch(chan) || (channel_voicebitch(chan) && chk_voice(fr, chan)))) ||
+                     /* Or, if the channel is -voice but they still qualify to be voiced */
                      (!channel_voice(chan) && !privchan(fr, chan, PRIV_VOICE) && chk_voice(fr, chan))
                     )
                    ) {