Once again allow MODE #channel -b+b *!*@*.example.com *!*@*.foo.example.com
authorMichael Poole <mdpoole@troilus.org>
Wed, 28 Nov 2007 05:47:11 +0000 (05:47 +0000)
committerMichael Poole <mdpoole@troilus.org>
Wed, 28 Nov 2007 05:47:11 +0000 (05:47 +0000)
Fixes bug SF#1840011.

git-svn-id: file:///home/klmitch/undernet-ircu/undernet-ircu-svn/ircu2/branches/u2_10_12_branch@1846 c9e4aea6-c8fd-4c43-8297-357d70d61c8c

ChangeLog
ircd/channel.c

index 131e12d2d53f4fc2a04b7bb96f9b0f13862b6a60..0cb609ab9862de14ab90d9100087c2ce46cafa21 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2007-11-28  Michael Poole <mdpoole@troilus.org>
+
+       * ircd/channel.c (mode_ban_invalidate): Clarify Doxygen comments.
+       (apply_ban): Only block narrower bans if the wider ban is active.
+
 2007-11-24  Michael Poole <mdpoole@troilus.org>
 
        * ircd/m_names.c (do_names): Don't try to re-initialize the start
index 4ba366982936a5a4aa31d078cc07b7825cb91fe1..d6e72c8a7c41496eef2037c487485d2a8a3637d1 100644 (file)
@@ -2172,9 +2172,10 @@ modebuf_extract(struct ModeBuf *mbuf, char *buf)
   return;
 }
 
-/** Simple function to invalidate bans
+/** Simple function to invalidate a channel's ban cache.
  *
- * This function sets all bans as being valid.
+ * This function marks all members of the channel as being neither
+ * banned nor banned.
  *
  * @param chan The channel to operate on.
  */
@@ -2766,9 +2767,9 @@ int apply_ban(struct Ban **banlist, struct Ban *newban, int do_free)
   assert(newban->flags & (BAN_ADD|BAN_DEL));
   if (newban->flags & BAN_ADD) {
     size_t totlen = 0;
-    /* If a less specific entry is found, fail.  */
+    /* If a less specific *active* entry is found, fail.  */
     for (ban = *banlist; ban; ban = ban->next) {
-      if (!bmatch(ban, newban)) {
+      if (!bmatch(ban, newban) && !(ban->flags & BAN_DEL)) {
         if (do_free)
           free_ban(newban);
         return 1;