Explorar el Código

* Fix bot not properly enforcing 'chanmode' modes when getting opped

Bryan Drewery hace 16 años
padre
commit
25cdba90fe
Se han modificado 2 ficheros con 4 adiciones y 0 borrados
  1. 1 0
      doc/UPDATES
  2. 3 0
      src/mod/irc.mod/chan.c

+ 1 - 0
doc/UPDATES

@@ -1,4 +1,5 @@
 * Bot now attempts to join a channel immediately on invite.
+* Fix bot not setting 'chanmode' channel modes when getting opped.
 
 1.3 - http://wraith.botpack.net/milestone/1.3
 * Binary / shell / startup changes

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

@@ -1443,7 +1443,10 @@ void recheck_channel(struct chanset_t *chan, int dobans)
       }
       // Flush out mask changes
       flush_mode(chan, QUICK); 
+    }
 
+    // Do this here as the above only runs after already having been opped and having gotten bans.
+    if (dobans) {
       if ((chan->status & CHAN_ASKEDMODES) && !channel_inactive(chan)) 
         dprintf(DP_MODE, "MODE %s\n", chan->name);
       recheck_channel_modes(chan);