Committer : entrope
CVSROOT : /cvsroot/undernet-ircu
Module : ircu2.10
Branch tags: u2_10_12_branch
Commit time: 2006-04-04 23:09:58 UTC
Modified files:
Tag: u2_10_12_branch
ircd/channel.c ChangeLog
Log message:
Allow both [EMAIL PROTECTED] and [EMAIL PROTECTED]/22 to be banned at the same
time.
---------------------- diff included ----------------------
Index: ircu2.10/ChangeLog
diff -u ircu2.10/ChangeLog:1.710.2.85 ircu2.10/ChangeLog:1.710.2.86
--- ircu2.10/ChangeLog:1.710.2.85 Tue Apr 4 16:07:02 2006
+++ ircu2.10/ChangeLog Tue Apr 4 16:09:48 2006
@@ -1,3 +1,9 @@
+2006-04-03 Michael Poole <[EMAIL PROTECTED]>
+
+ * ircd/channel.c (bmatch): If ipmask_check() indicates old_ban is
+ a CIDR-wise superset of new_ban, check whether new_ban is a
+ text-wise superset of old_ban.
+
2006-03-31 Michael Poole <[EMAIL PROTECTED]>
* tools/iauth-test (send_server_notice): Use a colon prefix before
Index: ircu2.10/ircd/channel.c
diff -u ircu2.10/ircd/channel.c:1.155.2.14 ircu2.10/ircd/channel.c:1.155.2.15
--- ircu2.10/ircd/channel.c:1.155.2.14 Sat Mar 18 20:03:55 2006
+++ ircu2.10/ircd/channel.c Tue Apr 4 16:09:47 2006
@@ -19,7 +19,7 @@
*/
/** @file
* @brief Channel management and maintenance
- * @version $Id: channel.c,v 1.155.2.14 2006/03/19 04:03:55 entrope Exp $
+ * @version $Id: channel.c,v 1.155.2.15 2006/04/04 23:09:47 entrope Exp $
*/
#include "config.h"
@@ -2685,8 +2685,12 @@
old_ban->banstr[old_ban->nu_len] = new_ban->banstr[new_ban->nu_len] = '@';
if (res)
return res;
- /* Compare the addresses. */
- return !ipmask_check(&new_ban->address, &old_ban->address,
old_ban->addrbits);
+ /* If the old ban's mask mismatches, cannot be a superset. */
+ if (!ipmask_check(&new_ban->address, &old_ban->address, old_ban->addrbits))
+ return 1;
+ /* Otherwise it depends on whether the old ban's text is a superset
+ * of the new. */
+ return mmatch(old_ban->banstr, new_ban->banstr);
}
/** Add a ban from a ban list and mark bans that should be removed
----------------------- End of diff -----------------------
_______________________________________________
Patches mailing list
[email protected]
http://undernet.sbg.org/mailman/listinfo/patches