Committer : entrope
CVSROOT : /cvsroot/undernet-ircu
Module : ircu2.10
Commit time: 2005-09-13 12:06:40 UTC
Modified files:
ChangeLog ircd/channel.c
Log message:
Fix bug in last commit to find_ban().
---------------------- diff included ----------------------
Index: ircu2.10/ChangeLog
diff -u ircu2.10/ChangeLog:1.696 ircu2.10/ChangeLog:1.697
--- ircu2.10/ChangeLog:1.696 Mon Sep 12 15:52:01 2005
+++ ircu2.10/ChangeLog Tue Sep 13 05:06:30 2005
@@ -1,3 +1,8 @@
+2005-09-13 Michael Poole <[EMAIL PROTECTED]>
+
+ * ircd/channel.c (find_ban): Revert to older style of comparison,
+ fixing the sense of one check. Spotted by Alex Badea.
+
2005-09-13 Alex Badea <[EMAIL PROTECTED]>
* ircd/ircd.c (try_connections): modify autoreconnect logic to
Index: ircu2.10/ircd/channel.c
diff -u ircu2.10/ircd/channel.c:1.151 ircu2.10/ircd/channel.c:1.152
--- ircu2.10/ircd/channel.c:1.151 Mon Sep 12 13:36:24 2005
+++ ircu2.10/ircd/channel.c Tue Sep 13 05:06:30 2005
@@ -19,7 +19,7 @@
*/
/** @file
* @brief Channel management and maintenance
- * @version $Id: channel.c,v 1.151 2005/09/12 20:36:24 entrope Exp $
+ * @version $Id: channel.c,v 1.152 2005/09/13 12:06:30 entrope Exp $
*/
#include "config.h"
@@ -380,16 +380,16 @@
continue;
/* Compare host portion of ban. */
hostmask = banlist->banstr + banlist->nu_len + 1;
- if (((banlist->flags & BAN_IPMASK)
+ if (!((banlist->flags & BAN_IPMASK)
&& ipmask_check(&cli_ip(cptr), &banlist->address, banlist->addrbits))
- || match(hostmask, cli_user(cptr)->host)
- || (sr && match(hostmask, sr) == 0)) {
- /* If an exception matches, no ban can match. */
- if (banlist->flags & BAN_EXCEPTION)
- return NULL;
- /* Otherwise, remember this ban but keep searching for an exception. */
- found = banlist;
- }
+ && match(hostmask, cli_user(cptr)->host)
+ && !(sr && match(hostmask, sr)))
+ continue;
+ /* If an exception matches, no ban can match. */
+ if (banlist->flags & BAN_EXCEPTION)
+ return NULL;
+ /* Otherwise, remember this ban but keep searching for an exception. */
+ found = banlist;
}
return found;
}
----------------------- End of diff -----------------------
_______________________________________________
Patches mailing list
[email protected]
http://undernet.sbg.org/mailman/listinfo/patches