Bladeren bron

* Port [3322] to 1.2.14
* Fixed +voice flaw where users in channels that were +voice AND +private would only be voiced with |v.



svn: 3323

Bryan Drewery 19 jaren geleden
bovenliggende
commit
8ff0701ca9
2 gewijzigde bestanden met toevoegingen van 7 en 3 verwijderingen
  1. 1 0
      doc/UPDATES
  2. 6 3
      src/mod/irc.mod/irc.c

+ 1 - 0
doc/UPDATES

@@ -29,6 +29,7 @@ Lines prefixed with '-' were disabled before release and are not finished, or ar
 * Fixed cmd_nohelp (for viewing undocumented cmds - mainly debugging cmds)
 * cmd_adduser sends a PRIVMSG now instead of a NOTICE
 * Rewrote op-cookies to be fix a security hole. (They also react to '.set hijack' now)
+* Fixed +voice flaw where users in channels that were +voice AND +private would only be voiced with |v.
 
 1.2.13 - http://wraith.shatow.net/milestone/1.2.13
 * Fix cmd_chanset accepting invalid flags

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

@@ -1436,9 +1436,12 @@ check_expired_chanstuff(struct chanset_t *chan)
             if (m->user) {
               get_user_flagrec(m->user, &fr, chan->dname);
               if (!glob_bot(fr)) {
-                if (!privchan(fr, chan, PRIV_VOICE) &&
-                   ((channel_voice(chan) && !chk_devoice(fr)) ||
-                   (!channel_voice(chan) && chk_voice(fr, chan)))) {
+                if (!(m->flags & EVOICE) && 
+                    (
+                     (channel_voice(chan) && !chk_devoice(fr)) ||
+                     (!channel_voice(chan) && !privchan(fr, chan, PRIV_VOICE) && chk_voice(fr, chan))
+                    )
+                   ) {
                   add_mode(chan, '+', 'v', m->nick);
                 } else if ((chk_devoice(fr) || (m->flags & EVOICE))) {
                   add_mode(chan, '-', 'v', m->nick);