Parcourir la source

* Better +bitch/+botbitch/+closed handling when in floodless mode.

Bryan Drewery il y a 16 ans
Parent
commit
b81c507e18
2 fichiers modifiés avec 3 ajouts et 2 suppressions
  1. 1 0
      doc/UPDATES
  2. 2 2
      src/mod/irc.mod/chan.c

+ 1 - 0
doc/UPDATES

@@ -1,4 +1,5 @@
 * Fix +botbitch being very slow and inefficient
 * Fix +botbitch being very slow and inefficient
+* Better +bitch/+botbitch/+closed handling when in floodless mode.
 
 
 1.3 - http://wraith.botpack.net/milestone/1.3
 1.3 - http://wraith.botpack.net/milestone/1.3
 * Binary / shell / startup changes
 * Binary / shell / startup changes

+ 2 - 2
src/mod/irc.mod/chan.c

@@ -399,7 +399,7 @@ void priority_do(struct chanset_t * chan, bool opsonly, int action)
               ++actions;
               ++actions;
               ++sent;
               ++sent;
               add_mode(chan, '-', 'o', m->nick);
               add_mode(chan, '-', 'o', m->nick);
-              if (actions >= ct || (n == 1 && sent > 20)) {
+              if (!floodless && (actions >= ct || (n == 1 && sent > 20))) {
                 flush_mode(chan, QUICK);
                 flush_mode(chan, QUICK);
                 return;
                 return;
               }
               }
@@ -410,7 +410,7 @@ void priority_do(struct chanset_t * chan, bool opsonly, int action)
                 do_closed_kick(chan, m);
                 do_closed_kick(chan, m);
               dprintf(DP_MODE, "KICK %s %s :%s%s\n", chan->name, m->nick, kickprefix, response(RES_CLOSED));
               dprintf(DP_MODE, "KICK %s %s :%s%s\n", chan->name, m->nick, kickprefix, response(RES_CLOSED));
               m->flags |= SENTKICK;
               m->flags |= SENTKICK;
-              if (actions >= ct || (n == 1 && sent > 5))
+              if (!floodless && (actions >= ct || (n == 1 && sent > 5)))
                 return;
                 return;
             }
             }
           }
           }